source: firmaeventos/eventos/templates/register.event.html @ 16cf088

Last change on this file since 16cf088 was 94b3e3f, checked in by lhernandez <lhernandez@…>, 7 years ago

Implementado registro de eventos

  • Property mode set to 100644
File size: 3.8 KB
Line 
1{% extends 'base.template.html' %}
2{% load staticfiles %}
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
28{% block content %}
29    <div class="content center">
30        <h5>Datos del Evento</h5><hr/><br>
31        <form id="form" method="post">
32            {% csrf_token %}
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' %}
37            </div>
38           
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' %}
44            </div>
45
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>
52                <div class="file-path-wrapper">
53                    {{ form.archivo }}
54                </div>
55                {% include 'base.forms.errors.html' with form_errors=form.archivo.errors col_title_error='col s2' col_msg_error='col s10' %}
56            </div>
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>
89            <div>
90                <button type="submit" class="btn waves-effect red darken-1">Registrar</button>
91            </div>
92            </div>
93        </form>
94    </div>
95{% endblock %}
Note: See TracBrowser for help on using the repository browser.