[c1ce0dd] | 1 | {% extends 'base.template.html' %} |
---|
| 2 | {% load staticfiles %} |
---|
| 3 | {% block title %}Participar en Consulta{% endblock %} |
---|
| 4 | {% block content %} |
---|
[f29adf8] | 5 | <form action="" role="form" method="post" autocomplete="off" id="encuesta_form"> |
---|
[c1ce0dd] | 6 | {% csrf_token %} |
---|
[f29adf8] | 7 | <div class="swiper-container"> |
---|
| 8 | <div class="swiper-wrapper"> |
---|
| 9 | |
---|
| 10 | {% for key, value in preguntas.items %} |
---|
| 11 | <div class="swiper-slide"> |
---|
| 12 | {{ value.label | safe }} |
---|
| 13 | <div class="input-field"> |
---|
| 14 | {{ value.field | safe }} |
---|
| 15 | </div> |
---|
[c1ce0dd] | 16 | </div> |
---|
[f29adf8] | 17 | {% endfor %} |
---|
| 18 | <div class="swiper-slide"> |
---|
[d923030] | 19 | <div class="center"> |
---|
[810b149] | 20 | <a type="button" class="btn submit waves-effect blue lighten-1" onclick="send_poll();">Enviar</a> |
---|
[d923030] | 21 | </div> |
---|
[c1ce0dd] | 22 | </div> |
---|
[f29adf8] | 23 | |
---|
| 24 | </div> |
---|
| 25 | <div class="swiper-pagination"></div> |
---|
| 26 | <div class="swiper-button-next"></div> |
---|
| 27 | <div class="swiper-button-prev"></div> |
---|
[c1ce0dd] | 28 | </div> |
---|
[810b149] | 29 | <a type="button" class="btn waves-effect blue lighten-1" href="{% url 'participacion_index' %}">Regresar</a> |
---|
[c1ce0dd] | 30 | </form> |
---|
| 31 | |
---|
| 32 | {% endblock %} |
---|
| 33 | |
---|
| 34 | {% block extraJs %} |
---|
| 35 | <script> |
---|
| 36 | $(document).ready(function(){ |
---|
[f29adf8] | 37 | var swiper = $('.swiper-container').swiper({ |
---|
| 38 | pagination: '.swiper-pagination', |
---|
| 39 | effect: 'slide', |
---|
| 40 | centeredSlides: true, |
---|
| 41 | paginationType: 'progress', |
---|
| 42 | nextButton: '.swiper-button-next', |
---|
| 43 | prevButton: '.swiper-button-prev', |
---|
| 44 | speed: 800, |
---|
| 45 | spaceBetween: 80, |
---|
| 46 | allowSwipeToNext:false |
---|
| 47 | }); |
---|
| 48 | swiper.nextButton.click(function(){ |
---|
| 49 | swiper.unlockSwipeToNext(); |
---|
| 50 | var progreso = control_progress(); |
---|
| 51 | if (progreso) { |
---|
| 52 | swiper.slideNext(); |
---|
| 53 | } |
---|
| 54 | swiper.lockSwipeToNext(); |
---|
| 55 | }); |
---|
[c1ce0dd] | 56 | }); |
---|
| 57 | </script> |
---|
| 58 | {% endblock %} |
---|