Skip to content
Browse files

#6 - Add asterisk to required form field

  • Loading branch information...
1 parent cd25c6f commit ecee21cc61a3aed015d1cf0cd8356a9db71bfc4c @ArtemSerga ArtemSerga committed Jan 11, 2013
Showing with 9 additions and 8 deletions.
  1. +9 −8 flask_admin/templates/admin/lib.html
View
17 flask_admin/templates/admin/lib.html
@@ -77,15 +77,16 @@
{{ form.hidden_tag() if form.hidden_tag is defined }}
{% for f in form if f.type != 'HiddenField' and f.type != 'CSRFTokenField' %}
- <div class="control-group{% if f.errors %} error{% endif %}">
- <div class="control-label">
- {% if h.is_required_form_field(f) %}
- <strong>{{ f.label.text }}</strong>
- {% else %}
+ <div class="control-group{% if f.errors %} error{% endif %}">
+ <div class="control-label">
{{ f.label.text }}
- {% endif %}
- </div>
- <div class="controls">
+ {% if h.is_required_form_field(f) %}
+ <strong style="color: red">&#42;</strong>
+ {% else %}
+ &nbsp;
+ {% endif %}
+ </div>
+ <div class="controls">
<div>
{% if not focus_set %}
{{ f(autofocus='autofocus')|safe }}

0 comments on commit ecee21c

Please sign in to comment.
Something went wrong with that request. Please try again.