Changeset b48caa5 in sicp


Ignore:
Timestamp:
May 25, 2015, 11:54:35 AM (9 years ago)
Author:
Ing. Roldan D. Vargas G <rvargas@…>
Branches:
master
Children:
2935333
Parents:
1c96561
Message:

se agrega etiqueta que muestra un asterisco en los campos obligatorios

File:
1 edited

Legend:

Unmodified
Added
Removed
  • templates/base_registro.html

    ra829d50 rb48caa5  
    3535                                    <div class="form-group">
    3636                                        <div>{{ field.label_tag }}</div>
    37                                         <div>
     37                                        <div {% if field.field.required %}class="input-group" {% endif %}>
    3838                                            {% if 'Captcha' in field.label_tag %}
    3939                                                &#160;<i class="glyphicon glyphicon-refresh js-captcha-refresh" style="cursor: pointer"></i>&#160;
    4040                                            {% endif %}
    4141                                            {{ field }}
     42                                            {% if field.field.required %}
     43                                                <span class="input-group-addon required" data-toggle="tooltip"
     44                                                      title="{% trans 'Este campo es requerido' %}">
     45                                                    <i class="glyphicon glyphicon-asterisk"></i>
     46                                                </span>
     47                                            {% endif %}
    4248                                        </div>
    4349                                        {% if field.errors %}
     
    6773        .centered-form { margin-top: 15px;margin-bottom: 120px; }
    6874        .centered-form .panel { background: rgba(255, 255, 255, 0.8); box-shadow: rgba(0, 0, 0, 0.3) 20px 20px 20px; }
    69         .required { font-size: 10px; color: #990000; }
     75        .required { font-size: 8px; color: #990000; }
    7076        .errorlist li {
    7177            list-style: none;
    7278        }
    7379        .alert { margin-top: 5px; }
     80        .select2-container.form-control { height: auto !important; padding: 0; border: 0; }
    7481    </style>
    7582    {% if form.errors %}
     
    8289        </script>
    8390    {% endif %}
    84     {% for field in form.visible_fields %}
    85         {% if 'select2' in field.field.widget.attrs.class %}
    86                 <script type="text/javascript">
    87                     $(document).ready(function() {
    88                         $("#{{ field.auto_id }}").select2({});
    89                     });
    90                 </script>
    91             {% endif %}
    92     {% endfor %}
     91    <script type="text/javascript">
     92        $(document).ready(function() {
     93            $(".select2").select2({});
     94        });
     95    </script>
    9396{% endblock %}
Note: See TracChangeset for help on using the changeset viewer.