Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
5.0 KiB

5 years ago
  1. <div class="form-row {{ pregunta.alias }} {{ pregunta.class }}">
  2. <div class="form-holder">
  3. {% if casoestudio is defined and casoestudio is not empty %}
  4. {% if respuestaca[pregunta.alias] is defined %}
  5. <a class="btn btn-primary btn-sm casoestudiobtn" data-toggle="collapse" data-target="#casoestudio{{ pregunta.id }}">{{ 'Caso de estudio'|trans({}) }}</a>
  6. <div id="casoestudio{{ pregunta.id }}" class="collapse casoestudiodiv">
  7. <pre>{{ respuestaca[pregunta.alias]|raw }}</pre>
  8. </div>
  9. {% endif %}
  10. {% endif %}
  11. {% if pregunta.preTitulo is not empty %}
  12. <div class="{{ tarea[0].getProcesosId.alias }}_pretitulo">{{ pregunta.preTitulo|trans({})|raw }}</div>
  13. {% endif %}
  14. <div class="switch switch-blue">
  15. <label for="{{ pregunta.alias }}">
  16. {% if respuestas is empty %}
  17. <input type="hidden" id="{{ pregunta.alias }}" name="{{ pregunta.alias }}" value="off" checked/>
  18. <input type="radio" id="{{ pregunta.alias }}-off" class="switch-input" name="{{ pregunta.alias }}-1" placeholder="{{ pregunta.placeholder|trans({}) }}" onclick="$('#{{ pregunta.alias }}').val('off')" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %} value="off" data-sonata-icheck="false" checked>
  19. <label for="{{ pregunta.alias }}-off" class="switch-label switch-label-off">OFF</label>
  20. <input type="radio" id="{{ pregunta.alias }}-on" class="switch-input" name="{{ pregunta.alias }}-1" placeholder="{{ pregunta.placeholder|trans({}) }}" onclick="$('#{{ pregunta.alias }}').val('on')" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %} value="on" data-sonata-icheck="false" >
  21. <label for="{{ pregunta.alias }}-on" class="switch-label switch-label-on">ON</label>
  22. <span class="switch-selection"></span>
  23. {% else %}
  24. {% set encontrada = false %}
  25. {% for respuesta in respuestas %}
  26. {% if respuesta.preguntas.id == pregunta.id %}
  27. {% set encontrada=true %}
  28. <input type="hidden" id="{{ pregunta.alias }}" name="{{ pregunta.alias }}" value="{{ respuesta.valor}}"/>
  29. <input type="radio" id="{{ pregunta.alias }}-off" class="switch-input" name="{{ pregunta.alias }}-1" placeholder="{{ pregunta.placeholder|trans({}) }}" onclick="$('#{{ pregunta.alias }}').val('off')" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %} value="off" data-sonata-icheck="false" {% if 'off' == respuesta.valor %}checked {% endif %}>
  30. <label for="{{ pregunta.alias }}-off" class="switch-label switch-label-off">OFF</label>
  31. <input type="radio" id="{{ pregunta.alias }}-on" class="switch-input" name="{{ pregunta.alias }}-1" placeholder="{{ pregunta.placeholder|trans({}) }}" onclick="$('#{{ pregunta.alias }}').val('on')" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %} value="on" data-sonata-icheck="false" {% if 'on' == respuesta.valor %}checked {% endif %}>
  32. <label for="{{ pregunta.alias }}-on" class="switch-label switch-label-on">ON</label>
  33. <span class="switch-selection"></span>
  34. {% endif %}
  35. {% endfor %}
  36. {% if not encontrada %}
  37. <input type="hidden" id="{{ pregunta.alias }}" name="{{ pregunta.alias }}" value="off" checked/>
  38. <input type="radio" id="{{ pregunta.alias }}-off" class="switch-input" name="{{ pregunta.alias }}-1" placeholder="{{ pregunta.placeholder|trans({}) }}" onclick="$('#{{ pregunta.alias }}').val('off')" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %} value="off" data-sonata-icheck="false" checked>
  39. <label for="{{ pregunta.alias }}-off" class="switch-label switch-label-off">OFF</label>
  40. <input type="radio" id="{{ pregunta.alias }}-on" class="switch-input" name="{{ pregunta.alias }}-1" placeholder="{{ pregunta.placeholder|trans({}) }}" onclick="$('#{{ pregunta.alias }}').val('on')"{% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %} value="on" data-sonata-icheck="false" >
  41. <label for="{{ pregunta.alias }}-on" class="switch-label switch-label-on">ON</label>
  42. <span class="switch-selection"></span>
  43. {% endif %}
  44. {% endif %}
  45. <span class="control-label__text">{{ pregunta.nombre|trans({})|raw }}</span></label>
  46. {% if pregunta.descripcion is not empty %}
  47. <div class="{{ tarea[0].getProcesosId.alias }}_descripcion">{{ pregunta.descripcion|trans({})|raw }}</div>
  48. {% endif %}
  49. </div>
  50. </div>
  51. </div>