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.

42 lines
3.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. {% else %}
  6. <div class="{{ tarea[0].getProcesosId.alias }}_pretitulo no-contenido">{{ pregunta.preTitulo|trans({})|raw }}</div>
  7. {% endif %}
  8. <label for="{{ pregunta.alias }}" class="{{ tarea[0].getProcesosId.alias }}_nombre">{{ pregunta.nombre|trans({})|raw }}</label>
  9. {% if pregunta.descripcion is not empty %}
  10. <div class="{{ tarea[0].getProcesosId.alias }}_descripcion">{{ pregunta.descripcion|trans({})|raw }}</div>
  11. {% else %}
  12. <div class="{{ tarea[0].getProcesosId.alias }}_descripcion no-contenido">{{ pregunta.descripcion|trans({})|raw }}</div>
  13. {% endif %}
  14. {% if casoestudio is defined and casoestudio is not empty %}
  15. {% if respuestaca[pregunta.alias] is defined and respuestaca[pregunta.alias] is not empty %}
  16. <a class="btn btn-primary btn-sm casoestudiobtn" data-toggle="collapse" data-target="#casoestudio{{ pregunta.id }}">{{ 'Caso de estudio'|trans({}) }}</a>
  17. <div id="casoestudio{{ pregunta.id }}" class="collapse casoestudiodiv">
  18. <pre>{{ respuestaca[pregunta.alias]|raw }}</pre>
  19. </div>
  20. {% endif %}
  21. {% else %}
  22. <a class="btn btn-primary btn-sm casoestudiobtn no-contenido" data-toggle="collapse" data-target="#casoestudio{{ pregunta.id }}"></a>
  23. <div id="casoestudio{{ pregunta.id }}" class="collapse casoestudiodiv no-contenido">
  24. </div>
  25. {% endif %}
  26. {% if respuestas is empty %}
  27. <textarea class="form-control" id="{{ pregunta.alias }}" name="{{ pregunta.alias }}" placeholder="{{ pregunta.placeholder|trans({}) }}" {{ pregunta.TipoPreguntaOptions|raw }} rows="10" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}></textarea>
  28. {% else %}
  29. {% set encontrada = false %}
  30. {% if respuesta[pregunta.alias] is defined %}
  31. {% set encontrada=true %}
  32. {% if respuesta[pregunta.alias] starts with '[' %}
  33. <textarea class="form-control" id="{{pregunta.alias }}" name="{{pregunta.alias }}" placeholder="{{ pregunta.placeholder|trans({}) }}" {{ pregunta.TipoPreguntaOptions|raw }} rows="10" {% if not pregunta.editable and 'caso_estudio' not in app.user.username and 'caso_estudio' not in app.user.name %} readonly {% endif %}>{% for respa in respuesta[pregunta.alias]|json_decode %} {{ '- '~ respa ~"\n"}}{% endfor %}</textarea>
  34. {% else %}
  35. <textarea class="form-control" id="{{pregunta.alias }}" name="{{pregunta.alias }}" placeholder="{{ pregunta.placeholder|trans({}) }}" {{ pregunta.TipoPreguntaOptions|raw }} rows="10" {% if not pregunta.editable and 'caso_estudio' not in app.user.username and 'caso_estudio' not in app.user.name %} readonly {% endif %}>{{ respuesta[pregunta.alias] }}</textarea>
  36. {% endif %}
  37. {% endif %}
  38. {% if not encontrada %}
  39. <textarea class="form-control" id="{{ pregunta.alias }}" name="{{ pregunta.alias }}" placeholder="{{ pregunta.placeholder|trans({}) }}" {{ pregunta.TipoPreguntaOptions|raw }} rows="10" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}></textarea>
  40. {% endif %}
  41. {% endif %}
  42. </div>
  43. </div>