source: firmaeventos/eventos/templates/register.event.html @ d285c11

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

Se elmino el div que daba el error en el html

  • Property mode set to 100644
File size: 7.0 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">
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            </div>
91            <div class="col s8 m2 offset-s2">
92            <div id="pdf-main-container" style="display:none;"><center><h5>Configurar Posicion de la Firma</h5></center> 
93                  <div id="pdf-loader2">Cargando documento ...</div>
94                  <div id="pdf-contents2">
95                    <div id="pdf-meta2">
96                      <div id="pdf-buttons2">
97                        <a class="waves-effect waves-light btn" id="pdf-prev2"><i class="material-icons">keyboard_arrow_left</i></a>
98                        <a class="waves-effect waves-light btn" id="pdf-next2"><i class="material-icons">keyboard_arrow_right</i></a>
99                      </div>
100                      <div id="page-count-container">Página <span id="pdf-current-page2"></span> de <span id="pdf-total-pages2"></span></div>
101                    </div>
102                    <img class="text" src="{% static 'img/QRCode.png' %}" id="texto"/>
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              {{ form.pos_x }}
115              {{ form.pos_y }}
116              {{ form.pag }}
117            </div>
118            <div class="center">
119            <h5>Datos de los Participantes</h5><hr/><br>
120            <table class="striped" id="id_orders_table">
121                <thead>
122                  <tr>
123                      <th scope="col">Nombres</th>
124                      <th scope="col">Apellidos</th>
125                      <th scope="col">Pasaporte</th>
126                      <th scope="col">Correo</th>
127                      <th scope="col">Opcion</th>
128                  </tr>
129                </thead>
130                <tbody>
131                {{ form2.management_form }}
132                {% for form in form2  %}
133                <tr id="{{ form1.prefix }}-row">
134                  <td>
135                  {{form.nombres}}
136                  </td>
137                  <td>
138                  {{form.apellidos}}
139                  </td>
140                  <td>
141                  {{form.pasaporte}}
142                  </td>
143                  <td>
144                  {{form.correo}}
145                  </td>
146                  <td></td>
147                </tr>
148                {% endfor %}
149                </tbody>
150            </table>
151            </div>
152            <div class="center">
153                <button type="submit" class="btn waves-effect blue darken-1">Registrar</button>
154            </div>
155            </div>
156        </form>
157    </div>
158{% endblock %}
Note: See TracBrowser for help on using the repository browser.