Skip to content

Commit

Permalink
Dev: Converted php into twig for arrays/array/no_dropdown question type
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikvitt committed May 4, 2018
1 parent 7beb995 commit 70c9ba3
Show file tree
Hide file tree
Showing 12 changed files with 135 additions and 138 deletions.

This file was deleted.

@@ -0,0 +1,47 @@
{#
/**
* array array, no dropdown, Html
*
* @var $sColumns : the columns, generated with the view columns/col.php
* @var $sHeaders : the headers, generated with the view rows/cell/thead.php
* @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-radio" role="group" aria-labelledby="ls-question-text-{{ basename }}">
<colgroup class="col-responses">
<col class="col-answers" style='width: {{ answerwidth }}%;' />

{# columns/col.php #}
{{sColumns }}

</colgroup>
<thead aria-hidden="true">
<tr class="ls-heading">

{# rows/cell/thead.php #}
{{ sHeaders }}

</tr>
</thead>
<tbody>
{% if anscount==0 %}
<tr>
<th class="answertext">
{{ gT('Error: This question has no answers.') }}
</th>
</tr>
{% endif %}

{# rows/answer_row.php #}
{{ sRows }}

</tbody>
</table>
<!-- end of answer -->
@@ -1,12 +1,12 @@
<?php
{#
/**
* Array, column
*
* @var $class
* @var $cellwidth
*/
?>
#}

<!-- col -->
<col class="<?php echo $class; ?>" style='width: <?php echo $cellwidth;?>%'/>
<col class="{{ class }}" style='width: {{ cellwidth }}%'/>
<!-- end of col -->

This file was deleted.

@@ -0,0 +1,39 @@
{#
/**
* Generate a row for the table
*
* @var $answer_tds : the cells of each row, generated with the view rows/cells/*.php
* @var $myfname
* @var $answertext
* @var $value
* @var $right_exists
* @var $answertextright
*/
#}

<!-- answer_row -->
<tr id="javatbd{{ myfname }}" class="answers-list radio-list {% if odd %} ls-odd{% else %} ls-even{% endif %}{%
if error %} ls-error-mandatory has-error{% endif %}" role="radiogroup" aria-labelledby="answertext{{ myfname }}">
<th id="answertext{{ myfname }}" class="answertext control-label{% if answerwidth==0 %} sr-only{% endif %}">
{{ answertext }}

{# Value for expression manager javascript (use id) ; no need to submit #}
{{ C.Html.hiddenField("java"~myfname,value,({
'id' : "java"~myfname,
'disabled' : true,
}))
}}
</th>

{# Defined in answer_td view #}
{{ answer_tds }}

{% if right_exists %}
<th class='answertextright information-item{% if answerwidth==0 %} sr-only{% endif %}'>{{ answertextright }}</th>
{% endif %}

{# No answer should come after right text at bipolar question #}
{{ no_answer_td }}

</tr>
<!-- end of answer_row -->

This file was deleted.

@@ -0,0 +1,26 @@
{#
/**
* Array, no drop down
* @var $label
* @var $ld
* @var $myfname
* @var $ld
* @var $CHECKED
* @var $checkconditionFunction
*/
#}

<!-- answer_td -->
<td class="answer_cell_{{ ld }}{% if ld=="" %} noanswer-item{% endif %} answer-item radio-item">
<input
type="radio"
name="{{ myfname }}"
value="{{ ld }}"
id="answer{{ myfname }}-{{ ld }}"
{{ CHECKED }}
/>
<label for="answer{{ myfname }}-{{ ld }}" class="ls-label-xs-visibility">
{{ label }}
</label>
</td>
<!-- end of answer_td -->

This file was deleted.

@@ -0,0 +1,8 @@
{#
/**
* Array header : answer or sub question
* @var $class
* @var $content
*/
#}
{{ doRender('/survey/questions/answer/global/table/cell/head_header', ({'class':class,'content':content})) }}

This file was deleted.

@@ -0,0 +1,9 @@
{#
/**
* Array header : informationnal item
* @var $class
* @var $content
*/
#}

{{ doRender('/survey/questions/answer/global/table/cell/head_information', ({'class':class,'content':content})) }}
@@ -1,15 +1,15 @@
<?php
{#
/**
* This view is used to repeat the headers of the table (question advanced attribute)
*
* @var $sHeaders
*/
?>
#}
<!-- repeat_header no drop down -->
</tbody>

<tbody>
<tr class="ls-heading ls-heading-repeat hidden-xs" aria-hidden="true">
<?php echo $sHeaders; ?>
{{ sHeaders }}
</tr>
<!-- end of repeat_header -->

0 comments on commit 70c9ba3

Please sign in to comment.