mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Always show option to download in the background immediately
This commit is contained in:
@ -64,7 +64,7 @@ else {
|
||||
$download{'gid'} = $uinfo[3];
|
||||
}
|
||||
}
|
||||
if ($in{'bg'} && $can_schedule) {
|
||||
if ($in{'bg'} == 1 && $can_schedule) {
|
||||
# Validate time
|
||||
$in{'hour'} =~ /^\d+$/ && $in{'min'} =~ /^\d+$/ &&
|
||||
$in{'day'} =~ /^\d+$/ && $in{'year'} =~ /^\d+$/ ||
|
||||
@ -111,7 +111,7 @@ if ($in{'bg'} && $can_background) {
|
||||
&unlock_file($atjob_cmd);
|
||||
&save_download(\%download);
|
||||
|
||||
if (!$can_schedule) {
|
||||
if (!$can_schedule || $in{'bg'} == 2) {
|
||||
# Just run this script right now
|
||||
&execute_command("$atjob_cmd $download{'id'} &");
|
||||
}
|
||||
|
@ -56,8 +56,10 @@ if ($can_download) {
|
||||
# Download time can be selected, for scheduling with At
|
||||
@now = localtime(time());
|
||||
print &ui_table_row($text{'index_bg'},
|
||||
&ui_radio("bg", 0, [ [ 0, $text{'index_bg0'}."<br>" ],
|
||||
[ 1, $text{'index_bg1'} ] ])." ".
|
||||
&ui_radio("bg", 0,
|
||||
[ [ 0, $text{'index_bg0'}."<br>" ],
|
||||
[ 2, $text{'index_bg1u'}."<br>" ],
|
||||
[ 1, $text{'index_bg1'} ] ])." ".
|
||||
&ui_textbox("day", $now[3], 2)."/".
|
||||
&ui_select("month", $now[4],
|
||||
[ map { [ $_, $text{"smonth_".($_+1)} ] }
|
||||
@ -72,7 +74,7 @@ if ($can_download) {
|
||||
# Download must be immediate, but can be backgrounded
|
||||
print &ui_table_row($text{'index_bg'},
|
||||
&ui_radio("bg", 0, [ [ 0, $text{'index_bg0'} ],
|
||||
[ 1, $text{'index_bg1u'} ] ]));
|
||||
[ 2, $text{'index_bg1u'} ] ]));
|
||||
}
|
||||
else {
|
||||
# Download is always right now
|
||||
|
Reference in New Issue
Block a user