Changeset aefbfb8 in sicp for templates


Ignore:
Timestamp:
May 20, 2015, 12:18:46 PM (9 years ago)
Author:
Ing. Roldan D. Vargas G <rvargas@…>
Branches:
master
Children:
b389daf
Parents:
bc9a444
Message:

se agrega instrucción generica para construir los campos de formularios si no son especificados

File:
1 edited

Legend:

Unmodified
Added
Removed
  • templates/base_registro.html

    ra26832a raefbfb8  
    2828                    <form role="form" class="form validate-form" method="{% block form_method %}post{% endblock %}" autocomplete="off" enctype="multipart/form-data">
    2929                        {% csrf_token %}
    30                         {% block form_inputs %}{% endblock %}
     30                        {% block form_inputs %}
     31                            {% for field in form.visible_fields %}
     32                                <div class="col-xs-12 col-sm-12 col-md-12">
     33                                    <div class="form-group">
     34                                        <div>{{ field.label_tag }}</div>
     35                                        <div>
     36                                            {% if 'Captcha' in field.label_tag %}
     37                                                &#160;<i class="glyphicon glyphicon-refresh js-captcha-refresh" style="cursor: pointer"></i>&#160;
     38                                            {% endif %}
     39                                            {{ field }}
     40                                        </div>
     41                                        {% if field.errors %}
     42                                            <div class="alert alert-danger" role="alert">{{ field.errors }}</div>
     43                                        {% endif %}
     44                                    </div>
     45                                </div>
     46                            {% endfor %}
     47                        {% endblock %}
    3148                        {% block form_buttons %}
    3249                            <input type="submit" value="{% trans 'Registrar' %}" class="btn btn-info btn-block">
Note: See TracChangeset for help on using the changeset viewer.