source: firmaeventos/eventos/templates/register.event.html @ 6312fce

Last change on this file since 6312fce was 6312fce, checked in by lhernandez <lhernandez@…>, 7 years ago

Cambios al models Evento, preparando el registro para los nuevo requerimientos

  • Property mode set to 100644
File size: 6.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/jquery/jquery-ui.js' %}"></script>
6    <script src="{% static 'js/formset.js' %}"></script>
7    <script src="{% static 'js/pdf.js' %}"></script>
8    <script src="{% static 'js/pdf.worker.js' %}"></script>
9    <script src="{% static 'js/draggable.js' %}"></script>
10    <!-- Coordenadas PDF-->
11    <script src="{% static 'js/DraggableSortable.js' %}"></script>
12    <script src="{% static 'js/docsDraggable.js' %}"></script>
13    <script type="text/javascript">
14    $(function() {
15        $('#id_orders_table tbody tr').formset({
16            // For inline formsets, be sure to set the prefix, as the default prefix
17            // ('form') isn't correct.
18            // Django appears to generate the prefix from the lowercase plural
19            // name of the related model, with camel-case converted to underscores.
20            prefix: 'form',
21            addText:'<i class="tiny material-icons prefix">add_circle_outline</i>Agregar Participante',
22            deleteText:'<i class="material-icons">delete_forever</i>',
23        })
24
25          $('.datepicker').pickadate({
26            selectMonths: true, // Creates a dropdown to control month
27            selectYears: 15, // Creates a dropdown of 15 years to control year,
28            today: 'Today',
29            clear: 'Clear',
30            close: 'Ok',
31            closeOnSelect: false, // Close upon selecting a date,
32            format: "dd/mm/yyyy",
33            // The title label to use for the month nav buttons
34            labelMonthNext: 'Mes siguiente',
35            labelMonthPrev: 'Mes anterior',
36
37            // The title label to use for the dropdown selectors
38            labelMonthSelect: 'Selecciona un mes',
39            labelYearSelect: 'Selecciona un año',
40
41            // Months and weekdays
42            monthsFull: [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ],
43            monthsShort: [ 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic' ],
44            weekdaysFull: [ 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado' ],
45            weekdaysShort: [ 'Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab' ],
46
47            // Materialize modified
48            weekdaysLetter: [ 'D', 'L', 'M', 'Mi', 'J', 'V', 'S' ],
49
50            // Today and clear
51            today: 'Hoy',
52            clear: 'Limpiar',
53            close: 'Ok',
54          });
55    })
56    </script>
57{%endblock%}
58
59{% block content %}
60    <div class="content center">
61        <h5>Datos del Evento</h5><hr/><br>
62        <form id="form" method="post" enctype="multipart/form-data">
63            {% csrf_token %}
64            <div class="input-field {% if form.nombre_evento.errors %}invalid{% endif %}">
65                {{ form.nombre_evento }}
66                <label for="icon_prefix {{ form.nombre_evento.auto_id }}">Nombre</label>
67                {% include 'base.forms.errors.html' with form_errors=form.nombre_evento.errors col_title_error='col s2' col_msg_error='col s10' %}
68            </div>
69           
70            <div class="input-field {% if form.fecha.errors %}invalid{% endif %}">
71                <i class="tiny material-icons prefix">perm_contact_calendar</i>
72                {{ form.fecha }}
73                <label for="icon_prefix {{ form.fecha.auto_id }}">Fecha</label>
74                {% include 'base.forms.errors.html' with form_errors=form.fecha.errors col_title_error='col s2' col_msg_error='col s10' %}
75            </div>
76
77            <div class="file-field input-field {% if form.archivo.errors %}invalid{% endif %}">
78               
79                <div class="btn">
80                <span for="icon_prefix {{ form.archivo.auto_id }}">Archivo</span>
81                    <input type="file" name="file" id="file" accept=".pdf">
82                </div>
83                <div class="file-path-wrapper">
84                    {{ form.archivo }}
85                </div>
86                {% include 'base.forms.errors.html' with form_errors=form.archivo.errors col_title_error='col s2' col_msg_error='col s10' %}
87               
88            </div>
89            <div id="pdf-main-container" style="display:none;"><center><h5>Configurar Posicion de la Firma</h5></center> 
90                  <div id="pdf-loader2">Cargando documento ...</div>
91                  <div id="pdf-contents2">
92                    <div id="pdf-meta2">
93                      <div id="pdf-buttons2">
94                        <button type="button" id="pdf-prev2" class="btn btn-default btn-sm">
95                          <span class="glyphicon glyphicon-step-backward"></span> 
96                        </button>
97                        <button type="button" id="pdf-next2" class="btn btn-default btn-sm">
98                          <span class="glyphicon glyphicon-step-forward"></span> 
99                        </button>                               
100                      </div>
101                      <div id="page-count-container">Página <div id="pdf-current-page2"></div> de <div id="pdf-total-pages2"></div></div>
102                    </div>
103                    <div class="overflow" >
104                      <div id="container1" class=".cropper-hidden">
105                        <!--<div class="ball blue">sdsa</div>-->
106                      </div>
107                      <br>
108                      <br>
109                    </div>         
110                    </div>
111                    <canvas id="pdf-canvas2" width="500"></canvas>
112                    <div id="page-loader2">Cargando página ...</div>
113              </div>
114            <h5>Datos de los Participantes</h5><hr/><br>
115            <table class="striped" id="id_orders_table">
116                <thead>
117                  <tr>
118                      <th scope="col">Nombres</th>
119                      <th scope="col">Apellidos</th>
120                      <th scope="col">Pasaporte</th>
121                      <th scope="col">Correo</th>
122                      <th scope="col">Opcion</th>
123                  </tr>
124                </thead>
125                <tbody>
126                {{ form2.management_form }}
127                {% for form in form2  %}
128                <tr id="{{ form.prefix }}-row">
129                  <td>
130                  {{form.nombres}}
131                  </td>
132                  <td>
133                  {{form.apellidos}}
134                  </td>
135                  <td>
136                  {{form.pasaporte}}
137                  </td>
138                  <td>
139                  {{form.correo}}
140                  </td>
141                  <td></td>
142                </tr>
143                {% endfor %}
144                </tbody>
145            </table>
146            <div>
147                <button type="submit" class="btn waves-effect blue darken-1">Registrar</button>
148            </div>
149            </div>
150        </form>
151    </div>
152{% endblock %}
Note: See TracBrowser for help on using the repository browser.