Merge branch 'ent-4975-Añadir-todas-las-horas-al-formulario-del-cron-from-y-cron-to' into 'develop'
fixed module cron minute selectors See merge request artica/pandorafms!2892
This commit is contained in:
commit
b1b6306c30
|
@ -1178,8 +1178,13 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
|
|||
}
|
||||
|
||||
// Minutes
|
||||
for ($i = 0; $i < 60; $i += 5) {
|
||||
for ($i = 0; $i < 60; $i++) {
|
||||
$minutes[$i] = $i;
|
||||
|
||||
// If minute is not a multiple of 5, then add style to option in order to hide it from minute select but still is a valid value that input can adopt. We want this in case a value that is not a multiple of 5 is entered in module's data configuration.
|
||||
if (($i % 5) != 0) {
|
||||
$minutes_hidden_options[$i] = 'display: none;';
|
||||
}
|
||||
}
|
||||
|
||||
// Month days
|
||||
|
@ -1216,13 +1221,13 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
|
|||
|
||||
if ($to) {
|
||||
$table->data[0][0] = html_print_select($hours, 'hour_to', $hour, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][1] = html_print_select($minutes, 'minute_to', $minute, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][1] = html_print_select($minutes, 'minute_to', $minute, '', __('Any'), '*', true, false, false, '', $disabled, false, $minutes_hidden_options);
|
||||
$table->data[0][2] = html_print_select($mdays, 'mday_to', $mday, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][3] = html_print_select($months, 'month_to', $month, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][4] = html_print_select($wdays, 'wday_to', $wday, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
} else {
|
||||
$table->data[0][0] = html_print_select($hours, 'hour_from', $hour, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][1] = html_print_select($minutes, 'minute_from', $minute, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][1] = html_print_select($minutes, 'minute_from', $minute, '', __('Any'), '*', true, false, false, '', $disabled, false, $minutes_hidden_options);
|
||||
$table->data[0][2] = html_print_select($mdays, 'mday_from', $mday, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][3] = html_print_select($months, 'month_from', $month, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
$table->data[0][4] = html_print_select($wdays, 'wday_from', $wday, '', __('Any'), '*', true, false, false, '', $disabled);
|
||||
|
|
Loading…
Reference in New Issue