diff --git a/app/eve_api/templates/eve_api/add.html b/app/eve_api/templates/eve_api/add.html index 9b847d7..c145b80 100644 --- a/app/eve_api/templates/eve_api/add.html +++ b/app/eve_api/templates/eve_api/add.html @@ -12,11 +12,9 @@
- + {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.api_user_id %} {% include "formtools/formfield.html" with field=form.api_key class="xxlarge"%} - - {% csrf_token %}
diff --git a/app/eve_api/templates/eve_api/update.html b/app/eve_api/templates/eve_api/update.html index ed5ce05..30d8aaf 100644 --- a/app/eve_api/templates/eve_api/update.html +++ b/app/eve_api/templates/eve_api/update.html @@ -11,11 +11,10 @@
- + {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.api_user_id %} {% include "formtools/formfield.html" with field=form.api_key class="xxlarge" %} {% include "formtools/formfield.html" with field=form.description class="xxlarge" %} - {% csrf_token %}
diff --git a/app/formtools/templates/formtools/formerror.html b/app/formtools/templates/formtools/formerror.html new file mode 100644 index 0000000..a0d6934 --- /dev/null +++ b/app/formtools/templates/formtools/formerror.html @@ -0,0 +1,6 @@ +{% if form.non_field_errors %} +
+

Oops! Something went wrong, check the following and try again.

+ {{ form.non_field_errors }} +
+{% endif %} diff --git a/app/formtools/templates/formtools/formfield.html b/app/formtools/templates/formtools/formfield.html index 1f664a9..7da5256 100644 --- a/app/formtools/templates/formtools/formfield.html +++ b/app/formtools/templates/formtools/formfield.html @@ -1,9 +1,13 @@ {% load add_class %} -
+
{{ field.label_tag }}
- {% if class %}{{ field|add_class:class }}{% else %}{{ field }}{% endif %} + {% if field.errors %} + {% if class %}{{ field|add_class:class|add_class:"error" }}{% else %}{{ field|add_class:"error" }}{% endif %} + {% else %} + {% if class %}{{ field|add_class:class }}{% else %}{{ field}}{% endif %} + {% endif %} {% if field.help_text %} {{ field.help_text }} {% endif %} diff --git a/app/groups/templates/groups/create_request.html b/app/groups/templates/groups/create_request.html index 138c572..0b0ecbc 100644 --- a/app/groups/templates/groups/create_request.html +++ b/app/groups/templates/groups/create_request.html @@ -11,6 +11,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.reason class="xxlarge" %} {% csrf_token %} diff --git a/app/hr/templates/hr/applications/accept.html b/app/hr/templates/hr/applications/accept.html index 5291746..6b5af19 100644 --- a/app/hr/templates/hr/applications/accept.html +++ b/app/hr/templates/hr/applications/accept.html @@ -11,6 +11,7 @@

Fill in a note you want to send to the user.

+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.text class="xxlarge" %} {% include "formtools/formfield.html" with field=form.template %} {% csrf_token %} diff --git a/app/hr/templates/hr/applications/add.html b/app/hr/templates/hr/applications/add.html index e8ea6ba..dad244a 100644 --- a/app/hr/templates/hr/applications/add.html +++ b/app/hr/templates/hr/applications/add.html @@ -12,6 +12,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.character %} {% include "formtools/formfield.html" with field=form.corporation %} {% csrf_token %} diff --git a/app/hr/templates/hr/applications/add_message.html b/app/hr/templates/hr/applications/add_message.html index cf2730c..6153819 100644 --- a/app/hr/templates/hr/applications/add_message.html +++ b/app/hr/templates/hr/applications/add_message.html @@ -9,6 +9,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.text class="xxlarge" %} {% if form.template %}{% include "formtools/formfield.html" with field=form.template %}{% endif %} {% csrf_token %} diff --git a/app/hr/templates/hr/applications/add_note.html b/app/hr/templates/hr/applications/add_note.html index d936a83..8d6703c 100644 --- a/app/hr/templates/hr/applications/add_note.html +++ b/app/hr/templates/hr/applications/add_note.html @@ -9,6 +9,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.text class="xxlarge" %} {% csrf_token %} diff --git a/app/hr/templates/hr/applications/reject.html b/app/hr/templates/hr/applications/reject.html index 8ff87fd..f4ecb97 100644 --- a/app/hr/templates/hr/applications/reject.html +++ b/app/hr/templates/hr/applications/reject.html @@ -11,6 +11,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.text class="xxlarge" %} {% include "formtools/formfield.html" with field=form.template %} {% csrf_token %} diff --git a/app/hr/templates/hr/blacklist_add.html b/app/hr/templates/hr/blacklist_add.html index f7de5bb..b769c3e 100644 --- a/app/hr/templates/hr/blacklist_add.html +++ b/app/hr/templates/hr/blacklist_add.html @@ -8,6 +8,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.type %} {% include "formtools/formfield.html" with field=form.value class="xxlarge" %} {% include "formtools/formfield.html" with field=form.reason class="xxlarge" %} diff --git a/app/hr/templates/hr/recommendations/add.html b/app/hr/templates/hr/recommendations/add.html index c80092c..81f7592 100644 --- a/app/hr/templates/hr/recommendations/add.html +++ b/app/hr/templates/hr/recommendations/add.html @@ -14,6 +14,7 @@ The person you are recommending needs to have created their application before y
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.character %} {% include "formtools/formfield.html" with field=form.application %} {% csrf_token %} diff --git a/app/reddit/templates/reddit/add.html b/app/reddit/templates/reddit/add.html index f17173d..14d6233 100644 --- a/app/reddit/templates/reddit/add.html +++ b/app/reddit/templates/reddit/add.html @@ -14,6 +14,7 @@ on from time to time

+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.username %} {% csrf_token %} diff --git a/app/sso/templates/sso/apipassword.html b/app/sso/templates/sso/apipassword.html index af45c5b..8325f20 100644 --- a/app/sso/templates/sso/apipassword.html +++ b/app/sso/templates/sso/apipassword.html @@ -13,6 +13,7 @@ password below.

+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.password %} {% csrf_token %} diff --git a/app/sso/templates/sso/emailchange.html b/app/sso/templates/sso/emailchange.html index fecd04c..cb21267 100644 --- a/app/sso/templates/sso/emailchange.html +++ b/app/sso/templates/sso/emailchange.html @@ -9,6 +9,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.email1 %} {% include "formtools/formfield.html" with field=form.email2 %} {% csrf_token %} diff --git a/app/sso/templates/sso/lookup/userlookup.html b/app/sso/templates/sso/lookup/userlookup.html index 4a54b4a..961f858 100644 --- a/app/sso/templates/sso/lookup/userlookup.html +++ b/app/sso/templates/sso/lookup/userlookup.html @@ -11,6 +11,7 @@

+ {% include "formtools/formerror.html" %} {% csrf_token %}
{{ form.type.label_tag }} diff --git a/app/sso/templates/sso/primarycharchange.html b/app/sso/templates/sso/primarycharchange.html index 7d19ab7..11c6af1 100644 --- a/app/sso/templates/sso/primarycharchange.html +++ b/app/sso/templates/sso/primarycharchange.html @@ -9,6 +9,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.character %} {% csrf_token %} diff --git a/app/sso/templates/sso/serviceaccount/add.html b/app/sso/templates/sso/serviceaccount/add.html index a5b58f6..f94c89f 100644 --- a/app/sso/templates/sso/serviceaccount/add.html +++ b/app/sso/templates/sso/serviceaccount/add.html @@ -18,6 +18,7 @@ up to date, if so use the "Refresh" function.

+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.character %} {% include "formtools/formfield.html" with field=form.service %} {% include "formtools/formfield.html" with field=form.password %} diff --git a/app/sso/templates/sso/serviceaccount/reset.html b/app/sso/templates/sso/serviceaccount/reset.html index d1a5a38..8292023 100644 --- a/app/sso/templates/sso/serviceaccount/reset.html +++ b/app/sso/templates/sso/serviceaccount/reset.html @@ -12,6 +12,7 @@ below.

+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.password %} {% csrf_token %} diff --git a/app/templates/registration/login.html b/app/templates/registration/login.html index 3d93dbb..68fbea1 100644 --- a/app/templates/registration/login.html +++ b/app/templates/registration/login.html @@ -15,6 +15,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.username %} {% include "formtools/formfield.html" with field=form.password %} diff --git a/app/templates/registration/password_change_form.html b/app/templates/registration/password_change_form.html index c8a5309..2a8d3e5 100644 --- a/app/templates/registration/password_change_form.html +++ b/app/templates/registration/password_change_form.html @@ -7,6 +7,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.old_password %} {% include "formtools/formfield.html" with field=form.new_password1 %} {% include "formtools/formfield.html" with field=form.new_password2 %} diff --git a/app/templates/registration/password_reset_form.html b/app/templates/registration/password_reset_form.html index 299544e..2a35243 100644 --- a/app/templates/registration/password_reset_form.html +++ b/app/templates/registration/password_reset_form.html @@ -7,6 +7,7 @@

Forgot your password? Enter your email in the form below and we'll send you instructions for creating a new one.

+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.email %} {% csrf_token %} diff --git a/app/templates/registration/registration_form.html b/app/templates/registration/registration_form.html index 123b194..c9cdd93 100644 --- a/app/templates/registration/registration_form.html +++ b/app/templates/registration/registration_form.html @@ -14,6 +14,7 @@
+ {% include "formtools/formerror.html" %} {% include "formtools/formfield.html" with field=form.username %} {% include "formtools/formfield.html" with field=form.email %} {% include "formtools/formfield.html" with field=form.password1 %}