[8fa24c3] | 1 | {% extends 'base.template.html' %} |
---|
| 2 | {% load staticfiles %} |
---|
| 3 | {% block title %}Registrar Evento{% endblock title %} |
---|
[94b3e3f] | 4 | {% block extraJs %} |
---|
[6312fce] | 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> |
---|
[94b3e3f] | 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. |
---|
[a4764f9] | 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>', |
---|
[94b3e3f] | 23 | }) |
---|
[a4764f9] | 24 | |
---|
[94b3e3f] | 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", |
---|
[a4764f9] | 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', |
---|
[94b3e3f] | 54 | }); |
---|
| 55 | }) |
---|
| 56 | </script> |
---|
| 57 | {%endblock%} |
---|
| 58 | |
---|
[8fa24c3] | 59 | {% block content %} |
---|
[406146f] | 60 | <div class="content"> |
---|
[d285c11] | 61 | <h5 class="center">Datos del Evento</h5><hr/><br> |
---|
[a4764f9] | 62 | <form id="form" method="post" enctype="multipart/form-data"> |
---|
[8fa24c3] | 63 | {% csrf_token %} |
---|
[d285c11] | 64 | <div class="center"> |
---|
[94b3e3f] | 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' %} |
---|
[8fa24c3] | 69 | </div> |
---|
| 70 | |
---|
[94b3e3f] | 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' %} |
---|
[8fa24c3] | 76 | </div> |
---|
| 77 | |
---|
[94b3e3f] | 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> |
---|
[406146f] | 82 | <input type="file" name="file" id="file" accept="application/pdf"> |
---|
[94b3e3f] | 83 | </div> |
---|
[8fa24c3] | 84 | <div class="file-path-wrapper"> |
---|
[94b3e3f] | 85 | {{ form.archivo }} |
---|
[8fa24c3] | 86 | </div> |
---|
[94b3e3f] | 87 | {% include 'base.forms.errors.html' with form_errors=form.archivo.errors col_title_error='col s2' col_msg_error='col s10' %} |
---|
[6312fce] | 88 | |
---|
[8fa24c3] | 89 | </div> |
---|
[d285c11] | 90 | </div> |
---|
[406146f] | 91 | <div class="col s8 m2 offset-s2"> |
---|
[6312fce] | 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"> |
---|
[406146f] | 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> |
---|
[6312fce] | 99 | </div> |
---|
[b1fd023] | 100 | <div id="page-count-container">Página <span id="pdf-current-page2"></span> de <span id="pdf-total-pages2"></span></div> |
---|
[6312fce] | 101 | </div> |
---|
[406146f] | 102 | <img class="text" src="{% static 'img/QRCode.png' %}" id="texto"/> |
---|
[6312fce] | 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> |
---|
[d285c11] | 114 | {{ form.pos_x }} |
---|
| 115 | {{ form.pos_y }} |
---|
| 116 | {{ form.pag }} |
---|
[406146f] | 117 | </div> |
---|
| 118 | <div class="center"> |
---|
[94b3e3f] | 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 %} |
---|
[d285c11] | 133 | <tr id="{{ form1.prefix }}-row"> |
---|
[94b3e3f] | 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> |
---|
[406146f] | 151 | </div> |
---|
| 152 | <div class="center"> |
---|
[4db73c3] | 153 | <button type="submit" class="btn waves-effect blue darken-1">Registrar</button> |
---|
[8fa24c3] | 154 | </div> |
---|
| 155 | </div> |
---|
| 156 | </form> |
---|
| 157 | </div> |
---|
| 158 | {% endblock %} |
---|