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"> |
---|
61 | <h5 class="center">Datos del Evento</h5><hr/><br> |
---|
62 | <form id="form" method="post" enctype="multipart/form-data"> |
---|
63 | {% csrf_token %} |
---|
64 | <div class="center"> |
---|
65 | <div class="input-field {% if form.nombre_evento.errors %}invalid{% endif %}"> |
---|
66 | {{ form.nombre_evento }} |
---|
67 | <label for="icon_prefix {{ form.nombre_evento.auto_id }}">Nombre</label> |
---|
68 | {% include 'base.forms.errors.html' with form_errors=form.nombre_evento.errors col_title_error='col s2' col_msg_error='col s10' %} |
---|
69 | </div> |
---|
70 | |
---|
71 | <div class="input-field {% if form.fecha.errors %}invalid{% endif %}"> |
---|
72 | <i class="tiny material-icons prefix">perm_contact_calendar</i> |
---|
73 | {{ form.fecha }} |
---|
74 | <label for="icon_prefix {{ form.fecha.auto_id }}">Fecha</label> |
---|
75 | {% include 'base.forms.errors.html' with form_errors=form.fecha.errors col_title_error='col s2' col_msg_error='col s10' %} |
---|
76 | </div> |
---|
77 | |
---|
78 | <div class="file-field input-field {% if form.archivo.errors %}invalid{% endif %}"> |
---|
79 | |
---|
80 | <div class="btn"> |
---|
81 | <span for="icon_prefix {{ form.archivo.auto_id }}">Archivo</span> |
---|
82 | <input type="file" name="file" id="file" accept="application/pdf"> |
---|
83 | </div> |
---|
84 | <div class="file-path-wrapper"> |
---|
85 | {{ form.archivo }} |
---|
86 | </div> |
---|
87 | {% include 'base.forms.errors.html' with form_errors=form.archivo.errors col_title_error='col s2' col_msg_error='col s10' %} |
---|
88 | |
---|
89 | </div> |
---|
90 | <h5 class="blue-text">Luego de cargar un documento debe colocar el código Qr en la ubicación y página de su preferencia.</h5> |
---|
91 | |
---|
92 | |
---|
93 | </div> |
---|
94 | <div class="col s8 m2 offset-s2"> |
---|
95 | <div id="pdf-main-container" style="display:none;"><center><h5>Configurar Posicion de la Firma</h5></center> |
---|
96 | <div id="pdf-loader2">Cargando documento ...</div> |
---|
97 | <div id="pdf-contents2"> |
---|
98 | <div id="pdf-meta2"> |
---|
99 | <div id="pdf-buttons2"> |
---|
100 | <a class="waves-effect waves-light btn" id="pdf-prev2"><i class="material-icons">keyboard_arrow_left</i></a> |
---|
101 | <a class="waves-effect waves-light btn" id="pdf-next2"><i class="material-icons">keyboard_arrow_right</i></a> |
---|
102 | </div> |
---|
103 | <div id="page-count-container">Página <span id="pdf-current-page2"></span> de <span id="pdf-total-pages2"></span></div> |
---|
104 | </div> |
---|
105 | <img class="text" src="{% static 'img/QRCode.png' %}" id="texto"/> |
---|
106 | <div class="overflow" > |
---|
107 | <div id="container1" class=".cropper-hidden"> |
---|
108 | <!--<div class="ball blue">sdsa</div>--> |
---|
109 | </div> |
---|
110 | <br> |
---|
111 | <br> |
---|
112 | </div> |
---|
113 | </div> |
---|
114 | <canvas id="pdf-canvas2" width="500"></canvas> |
---|
115 | <div id="page-loader2">Cargando página ...</div> |
---|
116 | </div> |
---|
117 | {{ form.pos_x }} |
---|
118 | {{ form.pos_y }} |
---|
119 | {{ form.pag }} |
---|
120 | </div> |
---|
121 | <div class="center"> |
---|
122 | <h5>Datos de los Participantes</h5><hr/><br> |
---|
123 | <table class="striped" id="id_orders_table"> |
---|
124 | <thead> |
---|
125 | <tr> |
---|
126 | <th scope="col">Nombres</th> |
---|
127 | <th scope="col">Apellidos</th> |
---|
128 | <th scope="col">Pasaporte</th> |
---|
129 | <th scope="col">Correo</th> |
---|
130 | <th scope="col">Opcion</th> |
---|
131 | </tr> |
---|
132 | </thead> |
---|
133 | <tbody> |
---|
134 | {{ form2.management_form }} |
---|
135 | {% for form in form2 %} |
---|
136 | <tr id="{{ form1.prefix }}-row"> |
---|
137 | <td> |
---|
138 | {{form.nombres}} |
---|
139 | </td> |
---|
140 | <td> |
---|
141 | {{form.apellidos}} |
---|
142 | </td> |
---|
143 | <td> |
---|
144 | {{form.pasaporte}} |
---|
145 | </td> |
---|
146 | <td> |
---|
147 | {{form.correo}} |
---|
148 | </td> |
---|
149 | <td></td> |
---|
150 | </tr> |
---|
151 | {% endfor %} |
---|
152 | </tbody> |
---|
153 | </table> |
---|
154 | </div> |
---|
155 | <div class="center"> |
---|
156 | <button type="submit" class="btn waves-effect blue darken-1">Registrar</button> |
---|
157 | </div> |
---|
158 | </div> |
---|
159 | </form> |
---|
160 | </div> |
---|
161 | {% endblock %} |
---|