diff --git a/blender-bfct/application/static/assets_shared b/blender-bfct/application/static/assets_shared index e5e703c..4b5c66b 160000 --- a/blender-bfct/application/static/assets_shared +++ b/blender-bfct/application/static/assets_shared @@ -1 +1 @@ -Subproject commit e5e703c7ea84bede3cba2c284000c4e28ba45809 +Subproject commit 4b5c66b2f45522574db483dc8ac96fac6ba2bfd2 diff --git a/blender-bfct/application/templates/apply.html b/blender-bfct/application/templates/apply.html index dcb4cda..ffb6094 100755 --- a/blender-bfct/application/templates/apply.html +++ b/blender-bfct/application/templates/apply.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} -{% block body %} {% block page_title %}Submit Application{% endblock %} +{% block body %}
@@ -18,12 +18,22 @@
{{ form.website(class='form-control', placeholder='e.g. http://www.yourname.me') }} + {% if form.website.errors %} +
    + {% for error in form.website.errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %}
{{ form.city_country(class='form-control', placeholder='Where do you currently live/teach?') }} + {% if form.city_country.errors %} +
    + {% for error in form.city_country.errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %}
@@ -37,7 +47,7 @@
- {{ form.institution_name(class="form-control", placeholder="University / School / Institution's name") }} + {{ form.institution_name(class="form-control", placeholder="University / School / Institution's name") }}
@@ -47,13 +57,13 @@

Select which skills you focus on for teaching. -

+
(hold Ctrl for multiple selections)

- {{ form.skills(class='form-control') }} + {{ form.skills(class='form-control') }}
@@ -71,7 +81,12 @@
- {{ form.video_example(class='form-control', placeholder='URL to a Video Example') }} + {{ form.video_example(class='form-control', placeholder='URL to a Video Example') }} + {% if form.video_example.errors %} +
    + {% for error in form.video_example.errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %}
@@ -87,7 +102,12 @@
- {{ form.written_example(class='form-control', placeholder='URL to a Written Example') }} + {{ form.written_example(class='form-control', placeholder='URL to a Written Example') }} + {% if form.written_example.errors %} +
    + {% for error in form.written_example.errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %}
@@ -102,7 +122,12 @@
- {{ form.portfolio_cv(class='form-control', placeholder='URL of your Portfolio or CV') }} + {{ form.portfolio_cv(class='form-control', placeholder='URL of your Portfolio or CV. e.g: http://yourportfolio.me') }} + {% if form.portfolio_cv.errors %} +
    + {% for error in form.portfolio_cv.errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %}
@@ -111,6 +136,11 @@
{{ form.bio_message(class='form-control', id='editor1', placeholder='Tell us a bit about yourself and why you want to be a BFCT') }} + {% if form.bio_message.errors %} +
    + {% for error in form.bio_message.errors %}
  • {{ error }}
  • {% endfor %} +
+ {% endif %}

diff --git a/blender-bfct/application/templates/security/_macros.html b/blender-bfct/application/templates/security/_macros.html new file mode 100644 index 0000000..57131d9 --- /dev/null +++ b/blender-bfct/application/templates/security/_macros.html @@ -0,0 +1,44 @@ +{% macro render_field_with_errors(field) %} + {{ field.label }} {{ field(**kwargs)|safe }} + {% if field.errors %} +
+ {% for error in field.errors %} + {{ error }} + {% endfor %} +
+ {% endif %} +{% endmacro %} + +{% macro render_field_with_errors_without_label(field) %} + {{ field(**kwargs)|safe }} + {% if field.errors %} +
+ {% for error in field.errors %} + {{ error }} + {% endfor %} +
+ {% endif %} +{% endmacro %} + +{% macro render_field(field) %} + {{ field(**kwargs)|safe }} +{% endmacro %} + +{% macro render_login_field_with_errors(field) %} + {{ field(**kwargs)|safe }} + {% if field.errors %} +
+ {% for error in field.errors %} + {{ error }} + {% endfor %} +
+ {% endif %} +{% endmacro %} + +{% macro render_register_field_with_errors(field) %} + {{ field(**kwargs)|safe }} +{% endmacro %} + +{% macro render_button(field) %} + {{ field(**kwargs)|safe }} +{% endmacro %} diff --git a/blender-bfct/application/templates/security/login_user.html b/blender-bfct/application/templates/security/login_user.html index 3ed8b84..e32f5ee 100644 --- a/blender-bfct/application/templates/security/login_user.html +++ b/blender-bfct/application/templates/security/login_user.html @@ -1,65 +1,77 @@ {% extends 'layout.html' %} +{% from "security/_macros.html" import render_field_with_errors, render_login_field_with_errors, render_register_field_with_errors, render_field %} -{% block header %} - -{% endblock%} +{% block page_title %} + Welcome! +{% endblock %} {% block body %} -
-