Changeset 94b3e3f in firmaeventos for eventos/templates/register.event.html
- Timestamp:
- Nov 20, 2017, 3:47:37 PM (6 years ago)
- Branches:
- master
- Children:
- 16cf088
- Parents:
- c9f75d7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
eventos/templates/register.event.html
r8fa24c3 r94b3e3f 2 2 {% load staticfiles %} 3 3 {% block title %}Registrar Evento{% endblock title %} 4 {% block extraJs %} 5 <script src="{% static "js/formset.js" %}"></script> 6 <script type="text/javascript"> 7 $(function() { 8 $('#id_orders_table tbody tr').formset({ 9 // For inline formsets, be sure to set the prefix, as the default prefix 10 // ('form') isn't correct. 11 // Django appears to generate the prefix from the lowercase plural 12 // name of the related model, with camel-case converted to underscores. 13 prefix: 'form' 14 }) 15 $('.datepicker').pickadate({ 16 selectMonths: true, // Creates a dropdown to control month 17 selectYears: 15, // Creates a dropdown of 15 years to control year, 18 today: 'Today', 19 clear: 'Clear', 20 close: 'Ok', 21 closeOnSelect: false, // Close upon selecting a date, 22 format: "dd/mm/yyyy", 23 }); 24 }) 25 </script> 26 {%endblock%} 27 4 28 {% block content %} 5 29 <div class="content center"> 30 <h5>Datos del Evento</h5><hr/><br> 6 31 <form id="form" method="post"> 7 32 {% csrf_token %} 8 <div class="input-field {% if form s.event.nombre.errors %}invalid{% endif %}">9 {{ form s.event.nombre}}10 <label for="icon_prefix {{ form s.event.nombre.auto_id }}">Nombre</label>11 {% include 'base.forms.errors.html' with form_errors=form s.event.nombre.errors col_title_error='col s2' col_msg_error='col s10' %}33 <div class="input-field {% if form.nombre_evento.errors %}invalid{% endif %}"> 34 {{ form.nombre_evento }} 35 <label for="icon_prefix {{ form.nombre_evento.auto_id }}">Nombre</label> 36 {% include 'base.forms.errors.html' with form_errors=form.nombre_evento.errors col_title_error='col s2' col_msg_error='col s10' %} 12 37 </div> 13 38 14 <div class="input-field {% if form s.event.fecha.errors %}invalid{% endif %}">15 <i class=" material-icons">perm_contact_calendar</i>16 {{ form s.event.fecha }}17 <label for="icon_prefix {{ form s.event.fecha.auto_id }}">Fecha</label>18 {% include 'base.forms.errors.html' with form_errors=form s.event.fecha.errors col_title_error='col s2' col_msg_error='col s10' %}39 <div class="input-field {% if form.fecha.errors %}invalid{% endif %}"> 40 <i class="tiny material-icons prefix">perm_contact_calendar</i> 41 {{ form.fecha }} 42 <label for="icon_prefix {{ form.fecha.auto_id }}">Fecha</label> 43 {% include 'base.forms.errors.html' with form_errors=form.fecha.errors col_title_error='col s2' col_msg_error='col s10' %} 19 44 </div> 20 45 21 <div class="file-field input-field {% if forms.event.archivo.errors %}invalid{% endif %}"> 22 <i class="material-icons">attachment</i> 46 <div class="file-field input-field {% if form.archivo.errors %}invalid{% endif %}"> 47 48 <div class="btn"> 49 <span for="icon_prefix {{ form.archivo.auto_id }}">Archivo</span> 50 <input type="file"> 51 </div> 23 52 <div class="file-path-wrapper"> 24 {{ form s.event.archivo }}53 {{ form.archivo }} 25 54 </div> 26 <label for="icon_prefix {{ forms.event.archivo.auto_id }}">Archivo</label> 27 {% include 'base.forms.errors.html' with form_errors=forms.event.archivo.errors col_title_error='col s2' col_msg_error='col s10' %} 55 {% include 'base.forms.errors.html' with form_errors=form.archivo.errors col_title_error='col s2' col_msg_error='col s10' %} 28 56 </div> 29 57 <h5>Datos de los Participantes</h5><hr/><br> 58 <table class="striped" id="id_orders_table"> 59 <thead> 60 <tr> 61 <th scope="col">Nombres</th> 62 <th scope="col">Apellidos</th> 63 <th scope="col">Pasaporte</th> 64 <th scope="col">Correo</th> 65 <th scope="col">Opcion</th> 66 </tr> 67 </thead> 68 <tbody> 69 {{ form2.management_form }} 70 {% for form in form2 %} 71 <tr id="{{ form.prefix }}-row"> 72 <td> 73 {{form.nombres}} 74 </td> 75 <td> 76 {{form.apellidos}} 77 </td> 78 <td> 79 {{form.pasaporte}} 80 </td> 81 <td> 82 {{form.correo}} 83 </td> 84 <td></td> 85 </tr> 86 {% endfor %} 87 </tbody> 88 </table> 30 89 <div> 31 90 <button type="submit" class="btn waves-effect red darken-1">Registrar</button>
Note: See TracChangeset
for help on using the changeset viewer.