Add 'Save and Run' button
authorJamie Cameron <jcameron@webmin.com>
Fri, 10 Dec 2010 20:04:14 +0000 (12:04 -0800)
committerJamie Cameron <jcameron@webmin.com>
Fri, 10 Dec 2010 20:04:14 +0000 (12:04 -0800)
cron/edit_cron.cgi
cron/lang/en
cron/save_cron.cgi

index 9ee9ebe..0388ef3 100755 (executable)
@@ -114,6 +114,7 @@ if (!$in{'new'}) {
 
        # Save button
        print "<td>",&ui_submit($text{'save'}),"</td>\n";
+       print "<td>",&ui_submit($text{'edit_saverun'}, 'saverun'),"</td>\n";
        print &ui_form_end();
 
        # Run button
index 19b8152..c1d6973 100644 (file)
@@ -48,6 +48,7 @@ edit_weekdays=Weekdays
 edit_all=All
 edit_selected=Selected ..
 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.
index 9161e52..54b1032 100755 (executable)
@@ -93,6 +93,14 @@ if ($in{'new'}) {
 else {
        &webmin_log("modify", "cron", $in{'user'}, \%in);
        }
-&redirect("");
+
+if ($in{'saverun'}) {
+       # Redirect to execute form
+       &redirect("exec_cron.cgi?idx=$in{'idx'}");
+       }
+else {
+       # Just go back to main menu
+       &redirect("");
+       }