🤬
  • Notification watch settings - add button to make watch use defaults (empties the settings)

  • Loading...
  • dgtlmoon committed 2 years ago
    b046d6ef
    1 parent e154a3cb
  • ■ ■ ■ ■ ■ ■
    changedetectionio/static/js/watch-settings.js
    skipped 29 lines
    30 30   });
    31 31   toggle();
    32 32   
     33 + $('#notification-setting-reset-to-default').click(function (e) {
     34 + $('#notification_title').val('');
     35 + $('#notification_body').val('');
     36 + $('#notification_format').val('System default');
     37 + 
     38 + });
    33 39  });
    34 40   
  • ■ ■ ■ ■ ■
    changedetectionio/templates/_common_fields.jinja
    skipped 25 lines
    26 26   <a href="{{url_for('notification_logs')}}" class="pure-button button-secondary button-xsmall" style="font-size: 70%">Notification debug logs</a>
    27 27   </div>
    28 28   <div id="notification-customisation" class="pure-control-group">
     29 + <a href="#notifications" id="notification-setting-reset-to-default" class="pure-button button-xsmall" style="float: right; background-color: #5f42dd; border-radius: 4px; font-size: 70%; color: #fff">Use defaults</a>
    29 30   <div class="pure-control-group">
    30 31   {{ render_field(form.notification_title, class="m-d notification-title", placeholder=settings_application['notification_title']) }}
    31 32   <span class="pure-form-message-inline">Title for all notifications</span>
    skipped 73 lines
Please wait...
Page is in error, reload to recover