Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: list with comment, dropdown style views
- Loading branch information
LouisGac
committed
Jan 25, 2016
1 parent
d418c40
commit f1809f6
Showing
4 changed files
with
111 additions
and
22 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
39 changes: 39 additions & 0 deletions
39
application/views/survey/questions/list_with_comment/dropdown/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,39 @@ | ||
<?php | ||
/** | ||
* List with comment, dropdown style, footer Html | ||
* @var $id answer'.$ia[1].'comment | ||
* @var $label_text $hint_comment | ||
* @var $kpclass | ||
* @var $name $ia[1].'comment | ||
* @var $tarows | ||
* @var $maxoptionsize | ||
* @var $has_comment_saved isset($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$fname2]) && $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$fname2] | ||
* @var $comment_saved htmlspecialchars( $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$fname2]) | ||
* @var $java_name java'.$ia[1].' | ||
* @var $java_id java'.$ia[1].' | ||
* @var $java_value $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] | ||
*/ | ||
?> | ||
</select> | ||
</p> | ||
|
||
|
||
<p class="comment answer-item text-item"> | ||
<label for="<?php echo $id;?>"> | ||
<?php echo $label_text;?>: | ||
</label> | ||
|
||
<textarea | ||
class="form-control textarea <?php echo $kpclass; ?>" | ||
name="<?php echo $name;?>" | ||
id="<?php echo $id;?>" | ||
rows="<?php echo $tarows; ?>" | ||
cols="<?php echo $maxoptionsize; ?>" | ||
> | ||
<?php if($has_comment_saved):?> | ||
<?php echo $comment_saved; ?> | ||
<?php endif;?> | ||
</textarea> | ||
|
||
<input class="radio" type="hidden" name="<?php echo $java_name?>" id="<?php echo $java_id; ?>" value="<?php echo $java_value;?>" /> | ||
</p> |
21 changes: 21 additions & 0 deletions
21
application/views/survey/questions/list_with_comment/dropdown/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,21 @@ | ||
<?php | ||
/** | ||
* List with comment, dropdown style, header Html | ||
* @var $name $ia[1] | ||
* @var $id answer'.$ia[1].' | ||
* @var $checkconditionFunction $checkconditionFunction.'(this.value, this.name, this.type) | ||
* @var $show_noanswer is_null($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]]) | ||
*/ | ||
?> | ||
<p class="select answer-item dropdown-item"> | ||
<select | ||
class="select form-control" | ||
name="<?php echo $name;?>" | ||
id="<?php echo $id;?>" | ||
onchange="<?php echo $checkconditionFunction;?>" > | ||
|
||
<?php if($show_noanswer):?> | ||
<option class="noanswer-item" value="" SELECTED> | ||
<?php eT('Please choose...');?> | ||
</option> | ||
<?php endif;?> |
12 changes: 12 additions & 0 deletions
12
application/views/survey/questions/list_with_comment/dropdown/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,12 @@ | ||
<?php | ||
/** | ||
* List with comment, dropdown style, item Html | ||
* @var $value $ansrow['code'] | ||
* @var $check_ans $check_ans | ||
* @var $option_text $ansrow['answer'] | ||
* @var $classes | ||
*/ | ||
?> | ||
<option class="<?php if(isset($classes)){echo $classes;}?>" value="<?php echo $value;?>" <?php echo $check_ans;?>> | ||
<?php echo $option_text;?> | ||
</option> |