Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LouisGac
committed
Apr 1, 2016
1 parent
dd9fa6c
commit 6451859
Showing
8 changed files
with
538 additions
and
317 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
application/views/survey/questions/arrays/multiflexi/answer.php
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,56 @@ | ||
<?php | ||
/** | ||
* Global container for the answer | ||
* | ||
* @var $answertypeclass | ||
* @var $extraclass | ||
* @var $answerwidth | ||
* @var $labelans | ||
* @var $cellwidth | ||
* @var $right_exists | ||
* | ||
*/ | ||
?> | ||
<!-- answer --> | ||
<div class="no-more-tables"> | ||
<table class="table question subquestions-list questions-list <?php echo $answertypeclass; ?>-list <?php echo $extraclass; ?>"> | ||
|
||
<colgroup class="col-responses"> | ||
<col class="answertext" style='width: <?php echo $answerwidth;?>%;'/> | ||
|
||
<?php foreach ($labelans as $i=>$ld):?> | ||
<col class="<?php // TODO: array2 alternation ?>" style='width: <?php echo $cellwidth;?>%;'/> | ||
<?php endforeach;?> | ||
|
||
<?php if ($right_exists):?> | ||
<col class="answertextright <?php // TODO: array2 alternation ?>" style='width: <?php echo $answerwidth;?>%;' /> | ||
<?php endif;?> | ||
</colgroup> | ||
|
||
<thead> | ||
<tr class="dontread"> | ||
<th> </th> | ||
|
||
<?php foreach ($labelans as $ld): ?> | ||
<th class='th-11'> | ||
<?php echo $ld;?> | ||
</th> | ||
<?php endforeach;?> | ||
|
||
<?php if ($right_exists):?> | ||
<th> | ||
| ||
</th> | ||
<?php endif;?> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<?php | ||
// Defined in answer_row view | ||
echo $sAnswerRows; | ||
?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end of answer --> |
3 changes: 3 additions & 0 deletions
3
application/views/survey/questions/arrays/multiflexi/empty_error.php
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,3 @@ | ||
<p class="error"> | ||
<?php eT("Error: There are no answer options for this question and/or they don't exist in this language.");?> | ||
</p> |
54 changes: 54 additions & 0 deletions
54
application/views/survey/questions/arrays/multiflexi/rows/answer_row.php
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,54 @@ | ||
<?php | ||
/** | ||
* Generate a row for the table | ||
* | ||
* @var $sDisplayStyle | ||
* @var $useAnswerWidth | ||
* @var $answerwidth | ||
* @var $myfname | ||
* @var $error | ||
* @var $row_value | ||
* @var $answertext | ||
* @var $answertextright | ||
* @var $answer_tds | ||
* @var $rightTd | ||
*/ | ||
?> | ||
|
||
<!-- answer_row --> | ||
<tr id="javatbd<?php echo $myfname;?>" class="<?php //TODO: alternation ?> well subquestion-list questions-list <?php echo $sDisplayStyle;?>"> | ||
<?php if ($useAnswerWidth): ?> | ||
<th class="answertext" style='width:<?php echo $answerwidth;?>%;' > | ||
<?php else: ?> | ||
<th class="answertext col-xs-12 col-sm-6"> | ||
<?php endif;?> | ||
|
||
|
||
<?php if($error): ?> | ||
<div class="alert alert-danger" role="alert"> | ||
<?php echo $answertext; ?> | ||
</div> | ||
<?php else: ?> | ||
<?php echo $answertext; ?> | ||
<?php endif;?> | ||
<input | ||
type="hidden" | ||
name="java<?php echo $myfname;?>" | ||
id="java<?php echo $myfname;?>" | ||
value="<?php echo $row_value;?>" | ||
/> | ||
</th> | ||
|
||
<?php | ||
// Defined in answer_td view | ||
echo $answer_tds; | ||
?> | ||
|
||
<!-- right --> | ||
<?php if($rightTd): ?> | ||
<td class="answertextright" style='text-align:left; width: <?php echo $answerwidth; ?>'> | ||
<?php echo $answertextright; ?> | ||
</td> | ||
<?php endif;?> | ||
</tr> | ||
<!-- end of answer_row --> |
71 changes: 71 additions & 0 deletions
71
application/views/survey/questions/arrays/multiflexi/rows/cells/answer_td.php
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,71 @@ | ||
<?php | ||
/** | ||
* Cell when checkbox layout is not used in advanced question attribute | ||
* | ||
* @var $dataTitle | ||
* @var $ld | ||
* @var $answertypeclass | ||
* @var $extraclass | ||
* @var $myfname2 | ||
* @var $answertext | ||
* @var $error | ||
* @var $myfname2_java_value | ||
* @var $inputboxlayout | ||
* @var $checkconditionFunction | ||
* @var $minvalue | ||
* @var $maxvalue | ||
* @var $reverse | ||
* @var $value | ||
* @var $sSeparator | ||
* @var $kpclass | ||
* @var $maxlength | ||
*/ | ||
?> | ||
|
||
<!-- answer_td --> | ||
<td data-title="<?php echo $dataTitle;?>" class="answer-cell-5 answer_cell_00<?php echo $ld;?> question-item answer-item <?php echo $answertypeclass; ?>-item <?php echo $extraclass; ?>"> | ||
<label for="answer<?php echo $myfname2;?>" class='col-xs-12 col-sm-12'> | ||
|
||
<input | ||
type="hidden" | ||
name="java<?php echo $myfname2;?>" | ||
id="java<?php echo $myfname2;?>" | ||
value="<?php echo $value; ?>" | ||
/> | ||
|
||
<?php if($inputboxlayout == false):?> | ||
<!-- InputBox Layout False --> | ||
<select | ||
class="multiflexiselect form-control" | ||
name="<?php echo $myfname2; ?>" | ||
id="answer<?php echo $myfname2;?>" | ||
onchange="<?php echo $checkconditionFunction; ?>(this.value, this.name, this.type)"> | ||
|
||
<option value=""> | ||
<?php eT('...'); ?> | ||
</option> | ||
|
||
|
||
<?php for($ii=$minvalue; ($reverse?$ii>=$maxvalue:$ii<=$maxvalue); $ii+=$stepvalue): ?> | ||
<?php $selected = (isset($value) && (string) $value == (string)$ii)?'SELECTED':''; ?> | ||
<option value="<?php echo str_replace('.',$sSeparator,$ii); ?>" <?php echo $selected;?>> | ||
<?php echo str_replace('.',$sSeparator,$ii); ?> | ||
</option> | ||
<?php endfor; ?> | ||
</select> | ||
<?php elseif($inputboxlayout == true): ?> | ||
<!-- InputBox Layout --> | ||
<input | ||
type='text' | ||
class="multiflexitext text <?php echo $kpclass;?>" | ||
name="<?php echo $myfname2; ?>" | ||
id="answer<?php echo $myfname2;?>" | ||
<?php echo $maxlength; ?> | ||
size=5 | ||
onkeyup="<?php echo $checkconditionFunction; ?>(this.value, this.name, this.type)" | ||
value="<?php echo $value; ?>" | ||
/> | ||
<?php endif; ?> | ||
</label> | ||
</td> | ||
<!-- end of answer_td --> |
62 changes: 62 additions & 0 deletions
62
application/views/survey/questions/arrays/multiflexi/rows/cells/answer_td_checkboxes.php
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,62 @@ | ||
<?php | ||
/** | ||
* Cell when checkbox layout is used in advanced question attribute | ||
* | ||
* @var $dataTitle | ||
* @var $ld | ||
* @var $answertypeclass | ||
* @var $value $myvalue | ||
* @var $myfname2 | ||
* @var $setmyvalue | ||
* @var $checkconditionFunction | ||
* @var $extraclass | ||
*/ | ||
?> | ||
|
||
<!-- answer_td_checkboxes --> | ||
<td data-title="<?php echo $dataTitle;?>" class="answer-cell-6 answer_cell_00<?php echo $ld; ?> question-item answer-item <?php echo $answertypeclass;?>-item"> | ||
|
||
<input | ||
type="hidden" | ||
name="java<?php echo $myfname2;?>" | ||
id="java<?php echo $myfname2;?>" | ||
value="<?php echo $value; ?>" | ||
/> | ||
|
||
<input | ||
type="hidden" | ||
name="<?php echo $myfname2; ?>" | ||
id="answer<?php echo $myfname2;?>" | ||
value="<?php echo $value; ?>" | ||
/> | ||
|
||
<input | ||
type="checkbox" | ||
class="checkbox <?php echo $extraclass;?>" | ||
name="cbox_<?php echo $myfname2;?>" | ||
id="cbox_<?php echo $myfname2;?>" | ||
<?php echo $setmyvalue; ?> | ||
onclick=" | ||
cancelBubbleThis(event); | ||
aelt=document.getElementById('answer<?php echo $myfname2;?>'); | ||
jelt=document.getElementById('java<?php echo $myfname2;?>'); | ||
if(this.checked) | ||
{ | ||
aelt.value=1; | ||
jelt.value=1; | ||
<?php echo $checkconditionFunction; ?>(1,'<?php echo $myfname2;?>',aelt.type); | ||
else | ||
{ | ||
aelt.value=''; | ||
jelt.value=''; | ||
<?php echo $checkconditionFunction; ?>('','<?php echo $myfname2;?>',aelt.type); | ||
} | ||
return true;" | ||
onchange="checkconditions(this.value, this.name, this.type)" | ||
/> | ||
|
||
<label class="hide read" for="cbox_<?php echo $myfname2;?>"> | ||
<?php echo $dataTitle;?> | ||
</label> | ||
</td> | ||
<!-- end of answer_td_checkboxes --> |
25 changes: 25 additions & 0 deletions
25
application/views/survey/questions/arrays/multiflexi/rows/repeat_header.php
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,25 @@ | ||
<?php | ||
/** | ||
* This view is used to repeat the headers of the table (question advanced attribute) | ||
* | ||
* @var $labelans | ||
* @var $right_exists | ||
* @var $cellwidth | ||
* @var $answerwidth | ||
*/ | ||
?> | ||
|
||
<!-- repeat_header --> | ||
</tbody> | ||
|
||
<tbody> | ||
<tr class="dontread repeat headings hidden-xs"> | ||
<?php foreach ($labelans as $i=>$ld):?> | ||
<col class="<?php // TODO: array2 alternation ?>" style='width: <?php echo $cellwidth;?>%;'/> | ||
<?php endforeach;?> | ||
|
||
<?php if ($right_exists):?> | ||
<col class="answertextright <?php // TODO: array2 alternation ?>" style='width: <?php echo $answerwidth;?>%;' /> | ||
<?php endif;?> | ||
</tr> | ||
<!-- end of repeat header --> |
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