diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py
index 2f28a62d..9eaa89a1 100644
--- a/changedetectionio/forms.py
+++ b/changedetectionio/forms.py
@@ -302,11 +302,11 @@ class quickWatchForm(Form):
class commonSettingsForm(Form):
- notification_urls = StringListField('Notification URL List', validators=[validators.Optional(), ValidateNotificationBodyAndTitleWhenURLisSet(), ValidateAppRiseServers()])
- notification_title = StringField('Notification Title', default=default_notification_title, validators=[validators.Optional(), ValidateTokensList()])
- notification_body = TextAreaField('Notification Body', default=default_notification_body, validators=[validators.Optional(), ValidateTokensList()])
- notification_format = SelectField('Notification Format', choices=valid_notification_formats.keys(), default=default_notification_format)
- fetch_backend = RadioField(u'Fetch Method', choices=content_fetcher.available_fetchers(), validators=[ValidateContentFetcherIsReady()])
+ notification_urls = StringListField('Notification URL list', validators=[validators.Optional(), ValidateNotificationBodyAndTitleWhenURLisSet(), ValidateAppRiseServers()])
+ notification_title = StringField('Notification title', default=default_notification_title, validators=[validators.Optional(), ValidateTokensList()])
+ notification_body = TextAreaField('Notification body', default=default_notification_body, validators=[validators.Optional(), ValidateTokensList()])
+ notification_format = SelectField('Notification format', choices=valid_notification_formats.keys(), default=default_notification_format)
+ fetch_backend = RadioField(u'Fetch method', choices=content_fetcher.available_fetchers(), validators=[ValidateContentFetcherIsReady()])
extract_title_as_title = BooleanField('Extract
from document and use as watch title', default=False)
class watchForm(commonSettingsForm):
@@ -316,15 +316,15 @@ class watchForm(commonSettingsForm):
minutes_between_check = html5.IntegerField('Maximum time in minutes until recheck',
[validators.Optional(), validators.NumberRange(min=1)])
- css_filter = StringField('CSS/JSON/XPATH Filter', [ValidateCSSJSONXPATHInput()])
+ css_filter = StringField('CSS/JSON/XPATH filter', [ValidateCSSJSONXPATHInput()])
subtractive_selectors = StringListField('Remove elements', [ValidateCSSJSONXPATHInput(allow_xpath=False, allow_json=False)])
title = StringField('Title')
- ignore_text = StringListField('Ignore Text', [ValidateListRegex()])
- headers = StringDictKeyValue('Request Headers')
- body = TextAreaField('Request Body', [validators.Optional()])
- method = SelectField('Request Method', choices=valid_method, default=default_method)
- ignore_status_codes = BooleanField('Ignore Status Codes (process non-2xx status codes as normal)', default=False)
+ ignore_text = StringListField('Ignore text', [ValidateListRegex()])
+ headers = StringDictKeyValue('Request headers')
+ body = TextAreaField('Request body', [validators.Optional()])
+ method = SelectField('Request method', choices=valid_method, default=default_method)
+ ignore_status_codes = BooleanField('Ignore status codes (process non-2xx status codes as normal)', default=False)
trigger_text = StringListField('Trigger/wait for text', [validators.Optional(), ValidateListRegex()])
save_button = SubmitField('Save', render_kw={"class": "pure-button pure-button-primary"})
@@ -350,12 +350,12 @@ class globalSettingsForm(commonSettingsForm):
extract_title_as_title = BooleanField('Extract from document and use as watch title')
base_url = StringField('Base URL', validators=[validators.Optional()])
global_subtractive_selectors = StringListField('Remove elements', [ValidateCSSJSONXPATHInput(allow_xpath=False, allow_json=False)])
- global_ignore_text = StringListField('Ignore Text', [ValidateListRegex()])
+ global_ignore_text = StringListField('Ignore text', [ValidateListRegex()])
ignore_whitespace = BooleanField('Ignore whitespace')
- render_anchor_tag_content = BooleanField('Render Anchor Tag Content',
+ render_anchor_tag_content = BooleanField('Render anchor tag content',
default=False)
save_button = SubmitField('Save', render_kw={"class": "pure-button pure-button-primary"})
- real_browser_save_screenshot = BooleanField('Save last screenshot when using Chrome?')
+ real_browser_save_screenshot = BooleanField('Save last screenshot when using Chrome')
removepassword_button = SubmitField('Remove password', render_kw={"class": "pure-button pure-button-primary"})
diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css
index 4cba122a..c5fb4004 100644
--- a/changedetectionio/static/styles/styles.css
+++ b/changedetectionio/static/styles/styles.css
@@ -182,7 +182,7 @@ body:after, body:before {
#notification-customisation {
border: 1px solid #ccc;
- padding: 1rem;
+ padding: 0.5rem;
border-radius: 5px; }
#notification-error-log {
@@ -285,6 +285,11 @@ footer {
padding-bottom: 1em; }
.pure-form .pure-control-group div, .pure-form .pure-group div, .pure-form .pure-controls div {
margin: 0px; }
+ .pure-form .pure-control-group .checkbox > *, .pure-form .pure-group .checkbox > *, .pure-form .pure-controls .checkbox > * {
+ display: inline;
+ vertical-align: middle; }
+ .pure-form .pure-control-group .checkbox > label, .pure-form .pure-group .checkbox > label, .pure-form .pure-controls .checkbox > label {
+ padding-left: 5px; }
.pure-form .error input {
background-color: #ffebeb; }
.pure-form ul.errors {
diff --git a/changedetectionio/static/styles/styles.scss b/changedetectionio/static/styles/styles.scss
index e8ed32e2..43974c11 100644
--- a/changedetectionio/static/styles/styles.scss
+++ b/changedetectionio/static/styles/styles.scss
@@ -241,7 +241,7 @@ body:after, body:before {
#notification-customisation {
border: 1px solid #ccc;
- padding: 1rem;
+ padding: 0.5rem;
border-radius: 5px;
}
@@ -375,6 +375,15 @@ footer {
div {
margin: 0px;
}
+ .checkbox {
+ > * {
+ display: inline;
+ vertical-align: middle;
+ }
+ > label {
+ padding-left: 5px;
+ }
+ }
}
/* The input fields with errors */
.error {
diff --git a/changedetectionio/templates/_common_fields.jinja b/changedetectionio/templates/_common_fields.jinja
index 514db394..a2f6cb46 100644
--- a/changedetectionio/templates/_common_fields.jinja
+++ b/changedetectionio/templates/_common_fields.jinja
@@ -15,7 +15,7 @@
Use AppRise URLs for notification to just about any service! Please read the notification services wiki here for important configuration notes.
discord://
notifications are cut at 2,000 characters in length.
tgram://
bots cant send messages to other bots, so you should specify chat ID of non-bot user.
- Go here for Notification debug logs
+ Go here for notification debug logs
@@ -25,7 +25,7 @@
{% endif %}
-
+
{{ render_field(form.notification_title, class="m-d") }}
Title for all notifications
diff --git a/changedetectionio/templates/_helpers.jinja b/changedetectionio/templates/_helpers.jinja
index 72187307..2b0d2829 100644
--- a/changedetectionio/templates/_helpers.jinja
+++ b/changedetectionio/templates/_helpers.jinja
@@ -1,3 +1,30 @@
+{% macro render_field(field) %}
+
{{ field(**kwargs)|safe }}
+
{{ field.label }}
+
+ {% if field.errors %}
+
+ {% for error in field.errors %}
+ - {{ error }}
+ {% endfor %}
+
+ {% endif %}
+
+{% endmacro %}
+
+{% macro render_checkbox_field(field) %}
+
+ {{ field(**kwargs)|safe }} {{ field.label }}
+ {% if field.errors %}
+
+ {% for error in field.errors %}
+ - {{ error }}
+ {% endfor %}
+
+ {% endif %}
+
+{% endmacro %}
+
{% macro render_field(field) %}
{{ field.label }}
{{ field(**kwargs)|safe }}
diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html
index 7229c52f..0517c028 100644
--- a/changedetectionio/templates/edit.html
+++ b/changedetectionio/templates/edit.html
@@ -1,7 +1,6 @@
{% extends 'base.html' %}
{% block content %}
-{% from '_helpers.jinja' import render_field %}
-{% from '_helpers.jinja' import render_button %}
+{% from '_helpers.jinja' import render_field, render_checkbox_field, render_button %}
{% from '_common_fields.jinja' import render_common_settings_form %}