Fix to improve the cron tip text and use note for better UI

This commit is contained in:
Ilia Ross
2025-11-09 00:00:52 +02:00
parent ff9348c056
commit 573f3d894a
5 changed files with 11 additions and 8 deletions

View File

@@ -924,7 +924,7 @@ foreach my $arr ("mins", "hours", "days", "months", "weekdays") {
$table .= &ui_columns_row(\@cols, [ "valign=top", "valign=top", "valign=top",
"valign=top", "valign=top" ]);
$table .= &ui_columns_end();
$table .= $text{'edit_ctrl'};
$table .= &ui_note($text{'edit_ctrl'}, 0);
$rv .= &ui_table_row(undef, $table, $width, undef, ['data-schedule-tr']);
return $rv;
}
@@ -1056,7 +1056,8 @@ foreach $arr ("mins", "hours", "days", "months", "weekdays") {
}
print "</tr></table></td>\n";
}
print "</tr> <tr $cb> <td colspan=5>$text{'edit_ctrl'}</td> </tr>\n";
my $ctlnote = &ui_note($text{'edit_ctrl'}, 0);
print "</tr> <tr $cb> <td colspan=5>$ctlnote</td> </tr>\n";
}
=head2 parse_times_input(&job, &in)

View File

@@ -63,7 +63,7 @@ edit_run=Run Now
edit_saverun=Save and Run Now
edit_clone=Clone Job
edit_return=cron job
edit_ctrl=Note: Ctrl-click (or command-click on the Mac) to select and de-select minutes, hours, days and months.
edit_ctrl=Tip: Use Ctrl-click (or -click on Mac) to select or deselect multiple items, or Shift-click to select a range
edit_special1=Simple schedule
edit_special0=Times and dates selected below ..
edit_special_hourly=Hourly

View File

@@ -234,7 +234,7 @@ if ( ( !$access{ 'sysdate' } && &has_command( "date" ) || !$access{ 'hwdate' } &
&webmincron::show_times_input($job), 2);
# Show ctrl help
print &ui_table_row(undef, $text{'index_ctrl'}, 2);
print &ui_table_row(undef, &ui_note($text{'index_ctrl'}, 0), 2);
print &ui_table_end();
print &ui_form_end([ [ "action", $text{'index_sync'} ] ]);

View File

@@ -19,7 +19,7 @@ index_tabsync2=Run system <tt>$1</tt> service for synchronization
index_desctime=This form is for changing the system's current time, which is used by all running processes. On operating systems that have a separate hardware clock, it can be used to set that too.
index_desczone=This form allows you to set the system's default time zone, which is used to convert the system time to a human-readable format and offset.
index_descsync=This form is for configuring the system to automatically synchronize the time with a remote server. Synchronization will be done using the Unix <tt>time</tt> protocol or NTP, depending on which commands are installed and what the remote system supports.
index_ctrl=Note: Ctrl-click (or command-click on the Mac) to select and de-select minutes, hours, days and months.
index_ctrl=Tip: Use Ctrl-click (or -click on Mac) to select or deselect multiple items, or Shift-click to select a range
action_save=Save
action_apply=Apply

View File

@@ -3344,7 +3344,7 @@ if ($head) {
}
}
=head2 ui_note(text)
=head2 ui_note(text, [whitespace-count])
Returns a note as a small font size text
@@ -3352,8 +3352,10 @@ Returns a note as a small font size text
sub ui_note
{
return &theme_ui_note(@_) if (defined(&theme_ui_note));
my ($text) = @_;
return "<font style='font-size:92%;opacity:0.66'>&nbsp;&nbsp;ⓘ&nbsp;&nbsp;".
my ($text, $whitespace) = @_;
$whitespace //= 2;
my $whitespace_str = "&nbsp;" x $whitespace;
return "<font style='font-size:92%;opacity:0.66'>${whitespace_str}ⓘ&nbsp;&nbsp;".
"$text</font>";
}