]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix schedule directives setting
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 1 May 2019 16:05:13 +0000 (18:05 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 2 May 2019 09:11:23 +0000 (11:11 +0200)
This case refers to situation when schedule resource is loaded by callback. For synchronous load the problem doesn't exist.

gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl

index 3b931f0303efedeb368817b8164c6234a24ab077..261b8c9caac8305528e66e26bb6b0c2c29085999 100644 (file)
                        ID="MonthDisable"
                        CssClass="w3-radio"
                        GroupName="Month"
-                       Attributes.onclick="$('.month<%=$this->MonthSingle->ClientID%>').hide();"
+                       Attributes.onchange="$('.month<%=$this->MonthSingle->ClientID%>').hide();"
                        Checked="true" />
                <com:TLabel ForControl="MonthDisable" Text="<%[ Disabled ]%>" />
                <com:TRadioButton
                        ID="MonthSingle"
                        CssClass="w3-radio"
                        GroupName="Month"
-                       Attributes.onclick="$('.month<%=$this->MonthSingle->ClientID%>').hide();$('#month<%=$this->MonthSingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.month<%=$this->MonthSingle->ClientID%>').hide();$('#month<%=$this->MonthSingle->ClientID%>').show()" />
                <com:TLabel ForControl="MonthSingle" Text="<%[ Single month ]%>" />
                <com:TRadioButton
                        ID="MonthRange"
                        CssClass="w3-radio"
                        GroupName="Month"
-                       Attributes.onclick="$('.month<%=$this->MonthSingle->ClientID%>').hide();$('#month_range<%=$this->MonthSingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.month<%=$this->MonthSingle->ClientID%>').hide();$('#month_range<%=$this->MonthSingle->ClientID%>').show()" />
                <com:TLabel ForControl="MonthRange" Text="<%[ Month range ]%>" />
                <div id="month<%=$this->MonthSingle->ClientID%>" class="w3-margin month<%=$this->MonthSingle->ClientID%>" style="display: <%=$this->MonthSingle->Checked ? 'block' : 'none'%>">
                        <com:Application.Web.Portlets.DirectiveComboBox
                        ID="WeekDisable"
                        CssClass="w3-radio"
                        GroupName="Week"
-                       Attributes.onclick="$('.week<%=$this->WeekSingle->ClientID%>').hide();"
+                       Attributes.onchange="$('.week<%=$this->WeekSingle->ClientID%>').hide();"
                        Checked="true" />
                <com:TLabel ForControl="WeekDisable" Text="<%[ Disabled ]%>" />
                <com:TRadioButton
                        ID="WeekSingle"
                        CssClass="w3-radio"
                        GroupName="Week"
-                       Attributes.onclick="$('.week<%=$this->WeekSingle->ClientID%>').hide();$('#week<%=$this->WeekSingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.week<%=$this->WeekSingle->ClientID%>').hide();$('#week<%=$this->WeekSingle->ClientID%>').show()" />
                <com:TLabel ForControl="WeekSingle" Text="<%[ Single week ]%>" />
                <com:TRadioButton
                        ID="WeekRange"
                        CssClass="w3-radio"
                        GroupName="Week"
-                       Attributes.onclick="$('.week<%=$this->WeekSingle->ClientID%>').hide();$('#week_range<%=$this->WeekSingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.week<%=$this->WeekSingle->ClientID%>').hide();$('#week_range<%=$this->WeekSingle->ClientID%>').show()" />
                <com:TLabel ForControl="WeekRange" Text="<%[ Week range ]%>" />
                <div id="week<%=$this->WeekSingle->ClientID%>" class="w3-margin week<%=$this->WeekSingle->ClientID%>" style="display: <%=$this->WeekSingle->Checked ? 'block' : 'none'%>">
                        <com:Application.Web.Portlets.DirectiveComboBox
                        ID="DayDisable"
                        CssClass="w3-radio"
                        GroupName="Day"
-                       Attributes.onclick="$('.day<%=$this->DaySingle->ClientID%>').hide();"
+                       Attributes.onchange="$('.day<%=$this->DaySingle->ClientID%>').hide();"
                        Checked="true" />
                <com:TLabel ForControl="DayDisable" Text="<%[ Disabled ]%>" />
                <com:TRadioButton
                        ID="DaySingle"
                        CssClass="w3-radio"
                        GroupName="Day"
-                       Attributes.onclick="$('.day<%=$this->DaySingle->ClientID%>').hide();$('#day<%=$this->DaySingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.day<%=$this->DaySingle->ClientID%>').hide();$('#day<%=$this->DaySingle->ClientID%>').show()" />
                <com:TLabel ForControl="DaySingle" Text="<%[ Single day ]%>" />
                <com:TRadioButton
                        ID="DayRange"
                        CssClass="w3-radio"
                        GroupName="Day"
-                       Attributes.onclick="$('.day<%=$this->DaySingle->ClientID%>').hide();$('#day_range<%=$this->DaySingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.day<%=$this->DaySingle->ClientID%>').hide();$('#day_range<%=$this->DaySingle->ClientID%>').show()" />
                <com:TLabel ForControl="DayRange" Text="<%[ Day range ]%>" />
                <div id="day<%=$this->DaySingle->ClientID%>" class="w3-margin day<%=$this->DaySingle->ClientID%>" style="display: <%=$this->DaySingle->Checked ? 'block' : 'none'%>">
                        <com:Application.Web.Portlets.DirectiveComboBox
                        ID="WdayDisable"
                        CssClass="w3-radio"
                        GroupName="Wday"
-                       Attributes.onclick="$('.day<%=$this->WdaySingle->ClientID%>').hide();"
+                       Attributes.onchange="$('.day<%=$this->WdaySingle->ClientID%>').hide();"
                        Checked="true" />
                <com:TLabel ForControl="WdayDisable" Text="<%[ Disabled ]%>" />
                <com:TRadioButton
                        ID="WdaySingle"
                        CssClass="w3-radio"
                        GroupName="Wday"
-                       Attributes.onclick="$('.day<%=$this->WdaySingle->ClientID%>').hide();$('#day<%=$this->WdaySingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.day<%=$this->WdaySingle->ClientID%>').hide();$('#day<%=$this->WdaySingle->ClientID%>').show()" />
                <com:TLabel ForControl="WdaySingle" Text="<%[ Single day of week ]%>" />
                <com:TRadioButton
                        ID="WdayRange"
                        CssClass="w3-radio"
                        GroupName="Wday"
-                       Attributes.onclick="$('.day<%=$this->WdaySingle->ClientID%>').hide();$('#day_range<%=$this->WdaySingle->ClientID%>').show()" />
+                       Attributes.onchange="$('.day<%=$this->WdaySingle->ClientID%>').hide();$('#day_range<%=$this->WdaySingle->ClientID%>').show()" />
                <com:TLabel ForControl="WdayRange" Text="<%[ Day of week range ]%>" />
                <div id="day<%=$this->WdaySingle->ClientID%>" class="w3-margin day<%=$this->WdaySingle->ClientID%>" style="display: <%=$this->WdaySingle->Checked ? 'block' : 'none'%>">
                        <com:Application.Web.Portlets.DirectiveComboBox
                        ID="TimeDisable"
                        CssClass="w3-radio"
                        GroupName="Time"
-                       Attributes.onclick="$('.day<%=$this->TimeAt->ClientID%>').hide();"
+                       Attributes.onchange="$('.day<%=$this->TimeAt->ClientID%>').hide();"
                        Checked="true" />
                <com:TLabel ForControl="TimeDisable" Text="<%[ Disabled ]%>" />
                <com:TRadioButton
                        ID="TimeAt"
                        CssClass="w3-radio"
                        GroupName="Time"
-                       Attributes.onclick="$('.day<%=$this->TimeAt->ClientID%>').hide();$('#day<%=$this->TimeAt->ClientID%>').show()" />
+                       Attributes.onchange="$('.day<%=$this->TimeAt->ClientID%>').hide();$('#day<%=$this->TimeAt->ClientID%>').show()" />
                <com:TLabel ForControl="TimeAt" Text="<%[ At HH:MM ]%>" />
                <com:TRadioButton
                        ID="TimeHourly"
                        CssClass="w3-radio"
                        GroupName="Time"
-                       Attributes.onclick="$('.day<%=$this->TimeAt->ClientID%>').hide();$('#day_range<%=$this->TimeAt->ClientID%>').show()" />
+                       Attributes.onchange="$('.day<%=$this->TimeAt->ClientID%>').hide();$('#day_range<%=$this->TimeAt->ClientID%>').show()" />
                <com:TLabel ForControl="TimeHourly" Text="<%[ Hourly at ]%>" />
                <div id="day<%=$this->TimeAt->ClientID%>" class="w3-margin day<%=$this->TimeAt->ClientID%>" style="display: <%=$this->TimeAt->Checked ? 'block' : 'none'%>">
                        <com:Application.Web.Portlets.DirectiveTextBox