Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: Converted php into twig for arrays/array/dropdown question type
- Loading branch information
1 parent
40b6c90
commit 7beb995
Showing
6 changed files
with
74 additions
and
72 deletions.
There are no files selected for viewing
30 changes: 0 additions & 30 deletions
30
application/views/survey/questions/answer/arrays/array/dropdown/answer.php
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
application/views/survey/questions/answer/arrays/array/dropdown/answer.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{# | ||
/** | ||
* array array, dropdown, Html | ||
* | ||
* @var $sRows : the rows, generated with the view rows/answer_row.php | ||
* | ||
* @var $extraclass | ||
* | ||
*/ | ||
#} | ||
<!-- Array --> | ||
|
||
<!-- answer --> | ||
<table class="{{ coreClass }} table table-bordered table-hover table-array-dropdown" role="group" aria-labelledby="ls-question-text-{{ basename }}"> | ||
<colgroup class="col-responses"> | ||
<col class="col-answers" style='width: {{ answerwidth }}%;' /> | ||
<col class="odd" style='width: {{ columnswidth }}%;' /> | ||
{% if right_exists %} | ||
<col class="col-answersright" style='width: {{ answerwidth }}%;' /> | ||
{% endif %} | ||
</colgroup> | ||
<tbody> | ||
|
||
{# rows/answer_row.php #} | ||
{{ sRows }} | ||
|
||
</tbody> | ||
</table> | ||
<!-- end of answer --> |
4 changes: 0 additions & 4 deletions
4
application/views/survey/questions/answer/arrays/array/dropdown/empty.php
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
application/views/survey/questions/answer/arrays/array/dropdown/empty.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- empty --> | ||
<p class="error"> | ||
{{ gT("Error: There are no answer options for this question and/or they don't exist in this language."); }} | ||
</p> |
38 changes: 0 additions & 38 deletions
38
application/views/survey/questions/answer/arrays/array/dropdown/rows/answer_row.php
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
application/views/survey/questions/answer/arrays/array/dropdown/rows/answer_row.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{# | ||
/** | ||
* @var $myfname | ||
* @var $answertext | ||
* @var $value | ||
* @var $error | ||
* @var $checkconditions | ||
* @var $options | ||
* @var $thRight | ||
* @var $tdRight | ||
* @var $right_exists | ||
* @var $answertextright | ||
*/ | ||
#} | ||
<tr id="javatbd{{ myfname }}" class="question-item answer-item dropdown-item {% if odd %} ls-odd {% else %} ls-even{% endif %}{% if error %} ls-error-mandatory has-error{% endif %}" > | ||
<th class="answertext control-label{% if answerwidth==0 %} sr-only{% endif %}"> | ||
<label for="answer{{ myfname }}"> | ||
{{ answertext }} | ||
</label> | ||
|
||
{# Value for expression manager javascript (use id) ; no need to submit #} | ||
{{ C.Html.hiddenField("java"~myfname,value,({ | ||
'id' : "java"~myfname, | ||
'disabled' : true, | ||
})) | ||
}} | ||
</th> | ||
<td> | ||
<select class="form-control" name="{{ myfname }}" id="answer{{ myfname }}"> | ||
{% for option in options %} | ||
<option value="{{ option.value }}" {{ option.selected }}> | ||
{{ option.text }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
</td> | ||
{% if right_exists %} | ||
<th class='answertextright information-item'>{{ answertextright }}</th> | ||
{% endif %} | ||
</tr> |