Report errors on submitting application, update assets_shared
This commit is contained in:
Submodule blender-bfct/application/static/assets_shared updated: e5e703c7ea...4b5c66b2f4
@@ -1,6 +1,6 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block body %}
|
||||
{% block page_title %}Submit Application{% endblock %}
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="container-fluid">
|
||||
@@ -18,12 +18,22 @@
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<span class="input-group-addon"><i class="fa fa-globe"></i></span>
|
||||
{{ form.website(class='form-control', placeholder='e.g. http://www.yourname.me') }}
|
||||
{% if form.website.errors %}
|
||||
<ul class="danger list-margin-none list-bullets-none padding-left-0 text-align-right">
|
||||
{% for error in form.website.errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<label class="control-label">Website</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<span class="input-group-addon"><i class="fa fa-map-marker"></i></span>
|
||||
{{ form.city_country(class='form-control', placeholder='Where do you currently live/teach?') }}
|
||||
{% if form.city_country.errors %}
|
||||
<ul class="danger list-margin-none list-bullets-none padding-left-0 text-align-right">
|
||||
{% for error in form.city_country.errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<label class="control-label">City and Country</label>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +57,7 @@
|
||||
<div class="col-md-6">
|
||||
<p class="offset-top-4">
|
||||
Select which skills you focus on for teaching.
|
||||
<br/><br/>
|
||||
<br/>
|
||||
<small>(hold Ctrl for multiple selections)</small>
|
||||
</p>
|
||||
</div>
|
||||
@@ -72,6 +82,11 @@
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<span class="input-group-addon"><i class="fa fa-file-video-o"></i></span>
|
||||
{{ form.video_example(class='form-control', placeholder='URL to a Video Example') }}
|
||||
{% if form.video_example.errors %}
|
||||
<ul class="danger list-margin-none list-bullets-none padding-left-0 text-align-right">
|
||||
{% for error in form.video_example.errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<label class="control-label">Video Example</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,6 +103,11 @@
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<span class="input-group-addon"><i class="fa fa-file-text-o"></i></span>
|
||||
{{ form.written_example(class='form-control', placeholder='URL to a Written Example') }}
|
||||
{% if form.written_example.errors %}
|
||||
<ul class="danger list-margin-none list-bullets-none padding-left-0 text-align-right">
|
||||
{% for error in form.written_example.errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<label class="control-label">Written Example</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,7 +122,12 @@
|
||||
<hr/>
|
||||
|
||||
<div class="input-group input-group-lg width-full">
|
||||
{{ 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 %}
|
||||
<ul class="danger list-margin-none list-bullets-none padding-left-0 text-align-right">
|
||||
{% for error in form.portfolio_cv.errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<label class="control-label">Porftolio / Curriculum Vitae</label>
|
||||
</div>
|
||||
|
||||
@@ -111,6 +136,11 @@
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<label class="control-label">Biography or Personal Message</label>
|
||||
{{ 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 %}
|
||||
<ul class="danger list-margin-none list-bullets-none padding-left-0 text-align-right">
|
||||
{% for error in form.bio_message.errors %}<li>{{ error }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
44
blender-bfct/application/templates/security/_macros.html
Normal file
44
blender-bfct/application/templates/security/_macros.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% macro render_field_with_errors(field) %}
|
||||
{{ field.label }} {{ field(**kwargs)|safe }}
|
||||
{% if field.errors %}
|
||||
<div class="error">
|
||||
{% for error in field.errors %}
|
||||
<span class="error_item danger">{{ error }} <i class="fa fa-warning"></i></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_field_with_errors_without_label(field) %}
|
||||
{{ field(**kwargs)|safe }}
|
||||
{% if field.errors %}
|
||||
<div class="error">
|
||||
{% for error in field.errors %}
|
||||
<span class="error_item danger">{{ error }} <i class="fa fa-warning"></i></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_field(field) %}
|
||||
<!-- <div class="form-group"> -->{{ field(**kwargs)|safe }}<!-- </div> -->
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_login_field_with_errors(field) %}
|
||||
{{ field(**kwargs)|safe }}
|
||||
{% if field.errors %}
|
||||
<div class="error">
|
||||
{% for error in field.errors %}
|
||||
<span class="error_item danger">{{ error }} <i class="fa fa-warning"></i></span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_register_field_with_errors(field) %}
|
||||
{{ field(**kwargs)|safe }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_button(field) %}
|
||||
{{ field(**kwargs)|safe }}
|
||||
{% endmacro %}
|
@@ -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 %}
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-signin .checkbox {
|
||||
font-weight: normal;
|
||||
}
|
||||
.form-signin .form-control {
|
||||
position: relative;
|
||||
height: auto;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.form-signin .form-control:focus {
|
||||
z-index: 2;
|
||||
}
|
||||
.form-signin input[type="email"] {
|
||||
margin-bottom: -1px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.form-signin input[type="password"] {
|
||||
margin-bottom: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
</style>
|
||||
{% block page_title %}
|
||||
Welcome!
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row" id="featured">
|
||||
<div class="container box">
|
||||
<form class="form-signin" role="login" action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
|
||||
{{ login_user_form.hidden_tag() }}
|
||||
<h2 class="form-signin-heading">Please sign in</h2>
|
||||
<input name="email" type="email" class="form-control" placeholder="Email address" required autofocus>
|
||||
<input name="password" type="password" class="form-control" placeholder="Password" required>
|
||||
<label class="checkbox">
|
||||
<input name="remember" type="checkbox" value="remember"> Remember me
|
||||
</label>
|
||||
{{ login_user_form.next }}
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||
</form>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-push-2">
|
||||
<div class="box">
|
||||
<i class="bf-blender backicon"></i>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<form role="login" action="{{ url_for_security('login') }}" method="POST" name="login_user_form" class="offset-top-5">
|
||||
{{ login_user_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
<!-- Email input-->
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<span class="input-group-addon"><i class="fa fa-envelope-o"></i></span>
|
||||
{{ render_login_field_with_errors(login_user_form.email, class='form-control', placeholder="E-mail") }}
|
||||
<label class="control-label">Email</label>
|
||||
</div>
|
||||
|
||||
<div class="clearfix offset-vertical-2"></div>
|
||||
|
||||
<!-- Password input-->
|
||||
<div class="input-group input-group-lg width-full">
|
||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||
{{ render_login_field_with_errors(login_user_form.password, class='form-control', placeholder="Password") }}
|
||||
<label class="control-label">Password</label>
|
||||
</div>
|
||||
|
||||
<!-- Multiple Checkboxes (inline) -->
|
||||
<div class="login-extra offset-vertical-2">
|
||||
<div class="control-group">
|
||||
<label class="control-label remember pull-left" for="remember">
|
||||
{{ render_login_field_with_errors(login_user_form.remember) }}
|
||||
Remember me
|
||||
</label>
|
||||
<a class="pull-right small" href="https://blender.org/id/reset">forgot password?</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
{{ render_field(login_user_form.next) }}
|
||||
<div class="clearfix"></div>
|
||||
</div> <!-- col-md-6 -->
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="width-full content-align-center offset-top-5 offset-bottom-5">
|
||||
<h2>
|
||||
One Account<br/>
|
||||
Everything Blender
|
||||
</h2>
|
||||
|
||||
<!-- Button -->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="signin"></label>
|
||||
<div class="controls content-align-center">
|
||||
{{ render_field(login_user_form.submit, value="Sign In", class='btn btn-default btn-lg btn-squishy width-75') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
<hr/>
|
||||
<a href="https://blender.org/id/register">Don't have a Blender ID yet?</a>
|
||||
</div>
|
||||
</div> <!-- col-md-6 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user