From 72818c5ec4130d0a2d6834b9f3dd70a069b87abc Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Wed, 16 Aug 2017 14:01:13 -0400 Subject: [PATCH] Use add_class widget to prevent overwrites of existing classes. --- core/templates/core/base.html | 12 +++++++++--- core/templates/core/child_form.html | 4 ++-- core/templates/core/diaperchange_form.html | 4 ++-- core/templates/core/feeding_form.html | 4 ++-- core/templates/core/note_form.html | 4 ++-- core/templates/core/sleep_form.html | 4 ++-- core/templates/core/tummytime_form.html | 4 ++-- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/core/templates/core/base.html b/core/templates/core/base.html index d0d50312..5bf290f0 100644 --- a/core/templates/core/base.html +++ b/core/templates/core/base.html @@ -8,11 +8,11 @@ + crossorigin="anonymous" /> + crossorigin="anonymous" />
- {% block content %}{% endblock %} +
+
+ {% block content %}{% endblock %} +
+
+ + \ No newline at end of file diff --git a/core/templates/core/child_form.html b/core/templates/core/child_form.html index 6b8fe37d..c127b3e9 100644 --- a/core/templates/core/child_form.html +++ b/core/templates/core/child_form.html @@ -21,9 +21,9 @@
{% if field.errors %} - {{ field|attr:"class:form-control is-invalid" }} + {{ field|add_class:"form-control is-invalid" }} {% else %} - {{ field|attr:"class:form-control" }} + {{ field|add_class:"form-control" }} {% endif %} {% if field.help_text %}

{{ field.help_text }}

diff --git a/core/templates/core/diaperchange_form.html b/core/templates/core/diaperchange_form.html index 476c85ff..cf0e9b90 100644 --- a/core/templates/core/diaperchange_form.html +++ b/core/templates/core/diaperchange_form.html @@ -21,9 +21,9 @@
{% if field.errors %} - {{ field|attr:"class:form-control is-invalid" }} + {{ field|add_class:"form-control is-invalid" }} {% else %} - {{ field|attr:"class:form-control" }} + {{ field|add_class:"form-control" }} {% endif %} {% if field.help_text %}

{{ field.help_text }}

diff --git a/core/templates/core/feeding_form.html b/core/templates/core/feeding_form.html index 6a2b3820..d34f8aa5 100644 --- a/core/templates/core/feeding_form.html +++ b/core/templates/core/feeding_form.html @@ -21,9 +21,9 @@
{% if field.errors %} - {{ field|attr:"class:form-control is-invalid" }} + {{ field|add_class:"form-control is-invalid" }} {% else %} - {{ field|attr:"class:form-control" }} + {{ field|add_class:"form-control" }} {% endif %} {% if field.help_text %}

{{ field.help_text }}

diff --git a/core/templates/core/note_form.html b/core/templates/core/note_form.html index 925c68c7..9af66c65 100644 --- a/core/templates/core/note_form.html +++ b/core/templates/core/note_form.html @@ -21,9 +21,9 @@
{% if field.errors %} - {{ field|attr:"class:form-control is-invalid" }} + {{ field|add_class:"form-control is-invalid" }} {% else %} - {{ field|attr:"class:form-control" }} + {{ field|add_class:"form-control" }} {% endif %} {% if field.help_text %}

{{ field.help_text }}

diff --git a/core/templates/core/sleep_form.html b/core/templates/core/sleep_form.html index 16195d5f..23171bf7 100644 --- a/core/templates/core/sleep_form.html +++ b/core/templates/core/sleep_form.html @@ -21,9 +21,9 @@
{% if field.errors %} - {{ field|attr:"class:form-control is-invalid" }} + {{ field|add_class:"form-control is-invalid" }} {% else %} - {{ field|attr:"class:form-control" }} + {{ field|add_class:"form-control" }} {% endif %} {% if field.help_text %}

{{ field.help_text }}

diff --git a/core/templates/core/tummytime_form.html b/core/templates/core/tummytime_form.html index ab95f057..dcdef1ad 100644 --- a/core/templates/core/tummytime_form.html +++ b/core/templates/core/tummytime_form.html @@ -21,9 +21,9 @@
{% if field.errors %} - {{ field|attr:"class:form-control is-invalid" }} + {{ field|add_class:"form-control is-invalid" }} {% else %} - {{ field|attr:"class:form-control" }} + {{ field|add_class:"form-control" }} {% endif %} {% if field.help_text %}

{{ field.help_text }}