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