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.

54 lines
3.7 KiB

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