mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
fixed enable switch
This commit is contained in:
@@ -22,9 +22,7 @@
|
||||
<th scope="row">Enabled</th>
|
||||
<td>
|
||||
<div class="form-check form-switch">
|
||||
<input name="edit_cron_enable_switch" class="form-check-input" type="checkbox" role="switch" id="edit_<?php echo $cron->id; ?>" <?php if ($cron->enabled ?? '0') {
|
||||
echo 'checked';
|
||||
} ?>>
|
||||
<input name="edit_cron_enable_switch" class="form-check-input" type="checkbox" role="switch" id="edit_<?php echo $cron->id; ?>" <?php if ($cron->enabled ?? '0') { echo 'checked'; } ?>>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -64,7 +62,7 @@
|
||||
<p class="text-center"> - OR -</p>
|
||||
<p>Enter your own Cron Expression</p>
|
||||
<input type="text" class="form-control mb-1" style="font-family: Courier New;" name="edit_cron_expression_custom" id="edit_cron_expression_custom" value="<?php echo htmlspecialchars($cron->expression); ?>">
|
||||
<em id="exp_humanreadable" style="display: none;">TEST</em>
|
||||
<em id="exp_humanreadable" style="display: none;"></em>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -94,7 +94,7 @@ function editCron() {
|
||||
var $cron_id = $('#edit_cron_id').val();
|
||||
var $cron_description = $('#edit_cron_description').val();
|
||||
var $cron_expression = $('#edit_cron_expression_custom').val();
|
||||
var $cron_enabled = $('#edit_' + $cron_id).is(':checked') ? '1' : '0';
|
||||
var $cron_enabled = $('#edit_' + $cron_id).is(':checked') ? 'true' : 'false';
|
||||
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/cron/edit',
|
||||
@@ -107,7 +107,6 @@ function editCron() {
|
||||
},
|
||||
success: function (data) {
|
||||
reloadCrons();
|
||||
console.log('edit success');
|
||||
},
|
||||
error: function (data) {
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user