]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix problem with setting hourly schedule - reported by Elias Pereira
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 15 Dec 2020 04:18:43 +0000 (05:18 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 21 Jan 2021 05:33:46 +0000 (06:33 +0100)
gui/baculum/protected/API/Class/BaculaSetting.php
gui/baculum/protected/Web/Lang/en/messages.po
gui/baculum/protected/Web/Lang/ja/messages.po
gui/baculum/protected/Web/Lang/pl/messages.po
gui/baculum/protected/Web/Lang/pt/messages.po
gui/baculum/protected/Web/Lang/ru/messages.po
gui/baculum/protected/Web/Portlets/DirectiveSchedule.php
gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl

index 22eb9bc7e2bc94db0dde639ef472e4ff9d0c2462..0c7296927ddbe27b15837f4848fe8b6451fdf26d 100644 (file)
@@ -327,7 +327,7 @@ class BaculaSetting extends APIModule {
                                                                }
                                                                $value = array($overwrite_directive, $month, $week, $day, $wday);
                                                                $hour_len = count($directive_value[$i]['Hour']);
-                                                               if ($hour_len == 24 && $min != 0) {
+                                                               if ($hour_len == 24) {
                                                                        $value[] = 'hourly';
                                                                }
                                                                if ($hour_len == 1 || ($hour_len == 24 && $min != 0)) {
index cf77eb21b9a1e234f8a5f5dace44a247255924c7..2873ea5f4f6bdbf808ca1d37d035b15a0a8c0785 100644 (file)
@@ -2399,9 +2399,6 @@ msgstr "Hour and minute"
 msgid "Validation error"
 msgstr "Validation error"
 
-msgid "Please choose at least month or week or day of week or hour in Run block"
-msgstr "Please choose at least month or week or day of week or hour in Run block"
-
 msgid "Please select month in Run block"
 msgstr "Please select month in Run block"
 
index b5b0730de568be296280c65da4b95fd88ea12fdb..168466d68d430a384cca872558b0999d6e96cbd5 100644 (file)
@@ -2485,9 +2485,6 @@ msgstr "Hour and minute"
 msgid "Validation error"
 msgstr "Validation error"
 
-msgid "Please choose at least month or week or day of week or hour in Run block"
-msgstr "Please choose at least month or week or day of week or hour in Run block"
-
 msgid "Please select month in Run block"
 msgstr "Please select month in Run block"
 
index aba90d09d113881500784f4a3b8906a0f779bb21..6eb1629e87a5e43b02c4363d52fbf6cbd32be930 100644 (file)
@@ -2409,9 +2409,6 @@ msgstr "Godzina i minuta"
 msgid "Validation error"
 msgstr "Błąd walidacji"
 
-msgid "Please choose at least month or week or day of week or hour in Run block"
-msgstr "Proszę wybrać co najmniej miesiąc lub tydzień lub dzień tygodnia lub godzinę w bloku Uruchom"
-
 msgid "Please select month in Run block"
 msgstr "Proszę wybrać miesiąc w bloku Uruchom"
 
index e1453ce1bb05b7c87e51c46c88e16bbe27e49d18..525dc3fe595d885bb298bd399304a0314ce52251 100644 (file)
@@ -2409,9 +2409,6 @@ msgstr "Hora e minuto"
 msgid "Validation error"
 msgstr "Erro de validação"
 
-msgid "Please choose at least month or week or day of week or hour in Run block"
-msgstr "Por favor selecione pelo menos o mês ou semana ou dia da semana ou hora no bloco Executar"
-
 msgid "Please select month in Run block"
 msgstr "Selecione o mês no bloco Executar"
 
index bc56ae3eac50653e84bb51fa77f4385fcac9f93e..bd4c92a75d1ef84763f8b4113054bef3a60d58b8 100644 (file)
@@ -2409,9 +2409,6 @@ msgstr "Часы и минуты"
 msgid "Validation error"
 msgstr "Ошибка проверки"
 
-msgid "Please choose at least month or week or day of week or hour in Run block"
-msgstr "Пожалуйста, выберите хотя бы месяц или неделю или день недели или час в блоке \"Выполнить\""
-
 msgid "Please select month in Run block"
 msgstr "Пожалуйста, выберите месяц в блоке \"Выполнить\""
 
index 60eed26af690ef861151a218ad8f3d97c5d35022..0d0f9536907986eef6056041bf32e880057475b3 100644 (file)
@@ -471,6 +471,8 @@ class DirectiveSchedule extends DirectiveListTemplate {
                                $directive_values[] = "hourly at {$hour}:{$minute}";
                                $obj->Hour = range(0, 23);
                                $obj->Minute = $value->TimeMinHourly->getDirectiveValue();
+                       } else {
+                               $directive_values[] = 'hourly';
                        }
                        $values['Run'][] = implode(' ', $directive_values);
                        $objs[] = $obj;
index c61701980d138fcaa49cda00b14e523dba2c18ae..ee63af37ed7876582874e554362ed7e1631a8679 100644 (file)
                        </div>
                </div>
        </div>
-       <com:TCustomValidator
-               ValidationGroup="Directive"
-               ControlToValidate="TimeDisable"
-               Display="None"
-               ClientValidationFunction="schedule_required_fields_validator"
-               ErrorMessage="<%=Prado::localize('Please choose at least month or week or day of week or hour in Run block')%> #<%=($this->ItemIndex+1)%>.">
-               <prop:ClientSide.OnValidate>
-                       var m = ($('#<%=$this->MonthSingle->ClientID%>').prop('checked') && $('#<%=$this->Month->ClientID%>_Directive').val());
-                       var m_r = ($('#<%=$this->MonthRange->ClientID%>').prop('checked') && $('#<%=$this->MonthRangeFrom->ClientID%>_Directive').val() && $('#<%=$this->MonthRangeTo->ClientID%>_Directive').val());
-                       var w = ($('#<%=$this->WeekSingle->ClientID%>').prop('checked') && $('#<%=$this->Week->ClientID%>_Directive').val());
-                       var w_r = ($('#<%=$this->WeekRange->ClientID%>').prop('checked') && $('#<%=$this->WeekRangeFrom->ClientID%>_Directive').val() && $('#<%=$this->WeekRangeTo->ClientID%>_Directive').val());
-                       var wd = ($('#<%=$this->WdaySingle->ClientID%>').prop('checked') && $('#<%=$this->Wday->ClientID%>_Directive').val());
-                       var wd_r = ($('#<%=$this->WdayRange->ClientID%>').prop('checked') && $('#<%=$this->WdayRangeFrom->ClientID%>_Directive').val() && $('#<%=$this->WdayRangeTo->ClientID%>_Directive').val());
-                       var t = ($('#<%=$this->TimeAt->ClientID%>').prop('checked') && $('#<%=$this->TimeHourAt->ClientID%>_Directive').val() && $('#<%=$this->TimeMinAt->ClientID%>_Directive').val());
-                       var t_h = ($('#<%=$this->TimeHourly->ClientID%>').prop('checked') && $('#<%=$this->TimeMinHourly->ClientID%>_Directive').val());
-                       sender.enabled = (!t && !t_h && !m && !m_r && !w && !w_r && !wd && !wd_r);
-               </prop:ClientSide.OnValidate>
-       </com:TCustomValidator>
        </prop:ItemTemplate>
 </com:TActiveRepeater>
 <com:TValidationSummary