From b6009ae9ffd604b097dda44cd1d3679835731949 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 10 Sep 2022 15:19:18 +0200 Subject: [PATCH] Notification - Reset defaults button should be on edit page only --- changedetectionio/static/js/watch-settings.js | 3 ++- changedetectionio/templates/_common_fields.jinja | 1 - changedetectionio/templates/edit.html | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changedetectionio/static/js/watch-settings.js b/changedetectionio/static/js/watch-settings.js index 803016bc..902e12f4 100644 --- a/changedetectionio/static/js/watch-settings.js +++ b/changedetectionio/static/js/watch-settings.js @@ -34,6 +34,7 @@ $(document).ready(function() { $('#notification_title').val(''); $('#notification_body').val(''); $('#notification_format').val('System default'); - + $('#notification_urls').val(''); + e.preventDefault(); }); }); diff --git a/changedetectionio/templates/_common_fields.jinja b/changedetectionio/templates/_common_fields.jinja index 4c717835..a12f6dff 100644 --- a/changedetectionio/templates/_common_fields.jinja +++ b/changedetectionio/templates/_common_fields.jinja @@ -26,7 +26,6 @@ Notification debug logs
- Use defaults
{{ render_field(form.notification_title, class="m-d notification-title", placeholder=settings_application['notification_title']) }} Title for all notifications diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index a52579f5..231c2016 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -146,6 +146,8 @@ User-Agent: wonderbra 1.0") }} There are system-wide notification URLs enabled, this form will override notification settings for this watch only ‐ an empty Notification URL list here will still send notifications.
{% endif %} + Use system defaults + {{ render_common_settings_form(form, emailprefix, settings_application) }}