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.
|
|
{% if pregunta.alias starts with 'ex17preg20' or pregunta.alias starts with 'ex17preg21' %}{%else%}<table id='table{{loop.index}}'class="table" > <thead class="thead-dark"> <tr> <th scope="col">{{'Products and Services you are offering!'|trans({})}}</th> <th scope="col">{{'Select an adequate revenue model for each'|trans({})}}</th> <th scope="col">{{'Price them'|trans({})}}</th> <th scope="col">{{'Actions'|trans({})}}</th> </tr> </thead> <tbody> {% if respuesta[pregunta.alias] is defined%} {% set respuestasarray=respuesta[pregunta.alias]|json_decode%} {% for indexArray in 0..respuestasarray|length-1 %} <tr> <td> {% if respuestas is empty %} <input type="text" class="form-control" id="{{ pregunta.alias }}-{{ indexArray }}" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }} {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}"> {% else %} {% set encontrada = false %} {% if respuesta[pregunta.alias] is defined and respuestasarray[indexArray] is defined%} {% set encontrada=true %} {% endif %} {% if encontrada %} <input type="text" class="form-control" id="{{ pregunta.alias }}-{{ indexArray }}" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }}" value="{{ respuestasarray[indexArray] }}" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}> {% else %} <input type="text" class="form-control" id="{{ pregunta.alias }}-{{ indexArray }}" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }} {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}"> {% endif %} {% endif %} </td> {% set preguntasIndex= preguntasIndex+1%} {% set pregunta= preguntas[preguntasIndex-1] %} {% if respuesta[pregunta.alias] is defined%} {% set respuestasrange1=respuesta[pregunta.alias]|json_decode%} {% endif %} <td> {% if respuestas is empty %} <input type="text" id="{{ pregunta.alias }}-{{ indexArray }}" data-sonata-select2 = "false" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}[]" ></input> {% else %} {% if respuesta[pregunta.alias] is defined and respuestasrange1[indexArray] is defined%} {% set encontrada=true %} {% endif %} {% if encontrada %} <input type="text" id="{{ pregunta.alias }}-{{ indexArray }}" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}[]" value="{{ respuestasrange1[indexArray] }}"></input> {% else %} <input type="text" id="{{ pregunta.alias }}-{{ indexArray }}" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}[]" ></input> {% endif %} {% endif %} <script> var dependant = {{ pregunta.TipoPreguntaOptions|raw }}; $("#{{ pregunta.alias }}-{{ indexArray }}").select3({ data: dependant}); setTimeout(function(){ $("#{{ pregunta.alias }}-{{ indexArray }}").next().next().remove();}, 2000); </script></td> {% set preguntasIndex= preguntasIndex+1%} {% set pregunta= preguntas[preguntasIndex-1] %} {% if respuesta[pregunta.alias] is defined %} {% set respuestasrange2=respuesta[pregunta.alias]|json_decode%} {% endif %} <td> {% if respuestas is empty %} <input type="text" class="form-control" id="{{ pregunta.alias }}-{{ indexArray }}" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }} {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}"> {% else %} {% set encontrada = false %} {% if respuesta[pregunta.alias] is defined and respuestasarray[indexArray] is defined%} {% set encontrada=true %} {%endif%} {% if encontrada %} <input type="text" class="form-control" id="{{ pregunta.alias }}-{{ indexArray }}" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }}" value="{{ respuestasrange2[indexArray] }}" {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}> {% else %} <input type="text" class="form-control" id="{{ pregunta.alias }}-{{ indexArray }}" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }} {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}"> {% endif %} {% endif %}</td> <td><button type="button" class="btn btn-warning delete-row" onclick="$(this).parents('tr').remove();">Delete Row</button></td> </tr> {% set preguntasIndex= preguntasIndex-2 %} {% set pregunta= preguntas[preguntasIndex-1] %} {% endfor %} {% else %} <tr> <td><input type="text" class="form-control" id="{{ pregunta.alias }}-0" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }} {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}"></td> {% set preguntasIndex= preguntasIndex+1%} {% set pregunta= preguntas[preguntasIndex-1] %}
<td><input type="text" id="{{ pregunta.alias }}-0" data-sonata-select2 = "false" style="width:80%;top: 28px; z-index: 100;" name="{{ pregunta.alias }}[]" ></input> <script> var dependant = {{ pregunta.TipoPreguntaOptions|raw }}; $("#{{ pregunta.alias }}-0").select3({ data: dependant}); setTimeout(function(){ $("#{{ pregunta.alias }}-0").next().next().remove();}, 2000); </script></td> {% set preguntasIndex= preguntasIndex+1%} {% set pregunta= preguntas[preguntasIndex-1] %} <td> <input type="text" class="form-control" id="{{ pregunta.alias }}-0" name="{{ pregunta.alias }}[]" placeholder="{{ pregunta.placeholder|trans({}) }} {% if not pregunta.editable and 'caso_estudio' not in app.user.username %} readonly {% endif %}"></td> <td><button type="button" class="btn btn-warning delete-row" onclick="$(this).parents('tr').remove();">Delete Row</button></td> </tr> {% endif %} </tbody> </table> <button type="button" class="btn btn-info add-row" onclick="addRow($(this).prev(), dependant)">Add Row</button> {% set preguntasIndex= preguntasIndex+2 %} {% endif %}
|