Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: multiple choice with comments, views
- Loading branch information
LouisGac
committed
Jan 26, 2016
1 parent
c4c5c38
commit c387f99
Showing
4 changed files
with
165 additions
and
74 deletions.
There are no files selected for viewing
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
6 changes: 6 additions & 0 deletions
6
application/views/survey/questions/multiplechoice_with_comments/footer.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,6 @@ | ||
<?php | ||
/** | ||
* Multiple choice with comments question, footer Html | ||
*/ | ||
?> | ||
</ul> |
9 changes: 9 additions & 0 deletions
9
application/views/survey/questions/multiplechoice_with_comments/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,9 @@ | ||
<?php | ||
/** | ||
* Multiple choice with comments question, header Html | ||
* @var $name 'MULTI'.$ia[1]; | ||
* @var $value $anscount; | ||
*/ | ||
?> | ||
<input type='hidden' name='<?php echo $name; ?>' value='<?php echo $value;?>' /> | ||
<ul class="list-unstyled subquestions-list questions-list checkbox-text-list"> |
73 changes: 73 additions & 0 deletions
73
application/views/survey/questions/multiplechoice_with_comments/item.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,73 @@ | ||
<?php | ||
/** | ||
* Multiple choice with comments question, item Html | ||
* @var $liclasses | ||
* @var $liid | ||
* @var $kpclass | ||
* @var $title | ||
* @var $sDisplayStyle | ||
* @var $name $myfname | ||
* @var $id answer$myfname | ||
* @var $value Y | ||
* @var $classes '' | ||
* @var $checked '' | ||
* @var $checkconditionFunction $checkconditionFunction(this.value, this.name, this.type); | ||
* @var $checkconditionFunctionComment | ||
* @var $labeltext $ansrow['question'] | ||
* @var $javaname java$myfname | ||
* @var $javavalue '' | ||
* @var $checked if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname])) ... | ||
* @var $inputCommentId 'answer'.$myfname2 | ||
* @var $commentLabelText gT('Make a comment on your choice here:'); ?> | ||
* @var $inputCommentName $myfname2 | ||
* @var $inputCOmmentValue if (isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname2])) {$answer_main .= htmlspecialchars($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$myfname2],ENT_QUOTES);} | ||
*/ | ||
?> | ||
<li class='<?php echo $liclasses;?>'> | ||
<!-- Checkbox and label --> | ||
<span class="option col-xs-12" <?php echo $sDisplayStyle ;?> > | ||
<span class="row"> | ||
<input | ||
class="checkbox <?php echo $classes; echo $kpclass; ?>" | ||
title="<?php echo $title;?>" | ||
type="checkbox" | ||
name="<?php echo $name; ?>" | ||
id="<?php echo $id;?>" | ||
value="<?php echo $value?>" | ||
<?php echo $checked;?> | ||
onclick="<?php echo $checkconditionFunction;?>" | ||
/> | ||
|
||
<label for="<?php echo $id;?>" class="answertext col-xs-11"> | ||
<?php echo $labeltext;?> | ||
</label> | ||
|
||
<?php if($javainput):?> | ||
<input | ||
type='hidden' | ||
name='<?php echo $javaname?>' | ||
id='<?php echo $javaname?>' | ||
value='<?php echo $javavalue;?>' | ||
<?php echo $checked;?> | ||
/> | ||
<?php endif;?> | ||
</span> | ||
</span> | ||
|
||
<!-- Comment --> | ||
<span class="comment col-xs-12" <?php echo $sDisplayStyle; ?>> | ||
<label for='<?php echo $inputCommentId;?>' class="answer-comment hide"> | ||
<?php echo $commentLabelText;?> | ||
</label> | ||
|
||
<input | ||
class='form-control text <?php echo $kpclass; ?>' | ||
type='text' | ||
size='40' | ||
id='<?php echo $inputCommentId;?>' | ||
name='<?php echo $inputCommentName; ?>' | ||
value='<?php echo $inputCOmmentValue; ?>' | ||
onkeyup='<?php echo $checkconditionFunctionComment;?>' | ||
/> | ||
</span> | ||
</li> |