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.
55 lines
3.7 KiB
55 lines
3.7 KiB
<div class="form-row {{ pregunta.alias }} {{ pregunta.class }}">
|
|
<div class="form-holder">
|
|
{% if pregunta.preTitulo is not empty %}
|
|
<div class="{{ tarea[0].getProcesosId.alias }}_pretitulo">{{ pregunta.preTitulo|trans({})|raw }}</div>
|
|
{% endif %}
|
|
<div class="{{ tarea[0].getProcesosId.alias }}_nombre">{{ pregunta.nombre|trans({})|raw }}</div>
|
|
{% if pregunta.descripcion is not empty %}
|
|
<div class="{{ tarea[0].getProcesosId.alias }}_descripcion">{{ pregunta.descripcion|trans({})|raw }}</div>
|
|
{% else %}
|
|
<div class="{{ tarea[0].getProcesosId.alias }}_descripcion no-contenido">{{ pregunta.descripcion|trans({})|raw }}</div>
|
|
{% endif %}
|
|
{% if casoestudio is defined and casoestudio is not empty %}
|
|
{% if respuestaca[pregunta.alias] is defined %}
|
|
<a class="btn btn-primary btn-sm casoestudiobtn" data-toggle="collapse" data-target="#casoestudio{{ pregunta.id }}">{{ 'Caso de estudio'|trans({}) }}</a>
|
|
<div id="casoestudio{{ pregunta.id }}" class="collapse casoestudiodiv">
|
|
<pre>{{ respuestaca[pregunta.alias]|raw }}</pre>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if respuestas is empty %}
|
|
{% set options = pregunta.TipoPreguntaOptions|split(',') %}
|
|
{% for option in options %}
|
|
|
|
<label for="{{ pregunta.alias ~ option }}">
|
|
<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 %}>
|
|
<span class="control-label__text">{{ option }}</span></label>
|
|
{% endfor %}
|
|
{% else %}
|
|
{% set encontrada = false %}
|
|
{% for respuesta in respuestas %}
|
|
{% if respuesta.preguntas.id == pregunta.id %}
|
|
{% set encontrada=true %}
|
|
{% set options = pregunta.TipoPreguntaOptions|split(',') %}
|
|
{% for option in options %}
|
|
<label for="{{ pregunta.alias ~ option }}">
|
|
<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" >
|
|
<span class="control-label__text">{{ option }}</span></label>
|
|
{% if option == respuesta.valor %} <script>$('#{{ pregunta.alias ~ option }}').iCheck('check');</script> {% endif %}
|
|
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if not encontrada %}
|
|
{% set options = pregunta.TipoPreguntaOptions|split(',') %}
|
|
|
|
{% for option in options %}
|
|
<label for="{{ pregunta.alias ~ option }}">
|
|
<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 %}>
|
|
<span class="control-label__text">{{ option }}</span></label>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|