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.

43 lines
2.6 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. <label for="{{ pregunta.alias }}" class="{{ tarea[0].getProcesosId.alias }}_nombre">{{ pregunta.nombre|trans({})|raw }}</label>
  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. <input type="text" id="{{ pregunta.alias }}" data-sonata-select2 = "false" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}" ></input>
  22. {% else %}
  23. {% set encontrada = false %}
  24. {% if respuesta[pregunta.alias] is defined %}
  25. {% set encontrada=true %}
  26. <input type="text" id="{{ pregunta.alias }}" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}" value="{{ respuesta[pregunta.alias] }}"></input>
  27. {% endif %}
  28. {% if not encontrada %}
  29. <input type="text" id="{{ pregunta.alias }}" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}" ></input>
  30. {% endif %}
  31. {% endif %}
  32. <script>
  33. var {{ pregunta.alias|replace({'-': ''}) }}Array = {{ pregunta.TipoPreguntaOptions|raw }};
  34. $("#{{ pregunta.alias }}").select3({ data: {{ pregunta.alias|replace({'-': ''}) }}Array });
  35. setTimeout(function(){ $("#{{ pregunta.alias }}").next().next().remove();}, 2000);
  36. </script>
  37. </div>
  38. </div>
  39. {% if tarea[0].alias starts with 'exercise14' %}
  40. <script>
  41. setTimeout(function(){$('#{{pregunta.alias}}').trigger('change');}, 2000);
  42. </script>
  43. {% endif %}