allow to disable task when creating

This commit is contained in:
Uwe Steinmann 2020-07-01 15:52:12 +02:00
parent 28aed4d11a
commit fd0a362578
2 changed files with 9 additions and 1 deletions

View File

@ -52,9 +52,10 @@ if ($action == "addtask") { /* {{{ */
$name = $_POST["name"];
$description = $_POST["description"];
$frequency = $_POST["frequency"];
$disabled = isset($_POST["disabled"]) ? $_POST["disabled"] : 0;
$params = $_POST["params"];
$newtask = $scheduler->addTask($extension, $task, $name, $description, $frequency, 0, $params);
$newtask = $scheduler->addTask($extension, $task, $name, $description, $frequency, $disabled, $params);
if ($newtask) {
}
else UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));

View File

@ -134,6 +134,13 @@ $(document).ready( function() {
<input type="text" id="frequency" name="frequency" value="">
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="disabled" value="1" checked> <?= getMLText('task_disabled'); ?>
</label>
</div>
</div>
<?php
if($additionalparams) {
foreach($additionalparams as $param) {