Allow 'notify each new species' to be toggled too
this code is a slight abomination but it does work!
This commit is contained in:
+6
-1
@@ -17,6 +17,11 @@ if(isset($_GET['apprise_notify_each_detection'])) {
|
||||
} else {
|
||||
$apprise_notify_each_detection = 0;
|
||||
}
|
||||
if(isset($_GET['apprise_notify_each_species'])) {
|
||||
exec('sudo systemctl start pushed_notifications.service');
|
||||
} else {
|
||||
exec('sudo systemctl stop pushed_notifications.service');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +127,7 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
|
||||
<input name="apprise_notification_title" type="text" value="<?php print($config['APPRISE_NOTIFICATION_TITLE']);?>" /><br>
|
||||
<label for="apprise_notification_body">Notification Body (use variables $sciname, $comname, or $confidence): </label>
|
||||
<input name="apprise_notification_body" type="text" value="<?php print($config['APPRISE_NOTIFICATION_BODY']);?>" /><br>
|
||||
<input type="checkbox" name="apprise_notify_each_species" value="true" disabled checked>
|
||||
<input type="checkbox" name="apprise_notify_each_species" <?php $output = shell_exec("service pushed_notifications status"); if (!strpos($output, 'dead') !== false) { echo "checked"; } ?>>
|
||||
<label for="apprise_notify_each_species">Notify each new species</label><br>
|
||||
<input type="checkbox" name="apprise_notify_each_detection" <?php if($config['APPRISE_NOTIFY_EACH_DETECTION'] == 1) { echo "checked"; };?> >
|
||||
<label for="apprise_notify_each_detection">Notify each new detection</label><br><br>
|
||||
|
||||
Reference in New Issue
Block a user