Skip to content

Commit

Permalink
DEV: changing switches
Browse files Browse the repository at this point in the history
  • Loading branch information
Trischi80 committed Feb 4, 2020
1 parent 6129c13 commit f371c4f
Show file tree
Hide file tree
Showing 36 changed files with 2,736 additions and 2,834 deletions.
19 changes: 10 additions & 9 deletions application/models/QuestionBaseDataSet.php
Expand Up @@ -288,14 +288,15 @@ protected function getEncryptionSwitch()
'classes' => [],
'options' => [
'option' => [
[
'text' => gT("On"),
'value' => 'Y'
],
[
'text' => gT("Off"),
'value' => 'N'
],
[
'text' => gT("On"),
'value' => 'Y'
],

]
],
],
Expand All @@ -312,19 +313,19 @@ protected function getSaveAsDefaultSwitch()
'formElementName' => false,
'formElementHelp' => gT('All attribute values for this question type will be saved as default'),
'inputtype' => 'switch',
'formElementValue' => '',
'formElementValue' => ($this->oQuestion->same_default == 1) ? 'Y' : 'N',
'formElementOptions' => [
'classes' => [],
'options' => [
'option' => [
[
'text' => gT("On"),
'value' => 'Y'
],
[
'text' => gT("Off"),
'value' => 'N'
],
[
'text' => gT("On"),
'value' => 'Y'
],
]
],
],
Expand Down
1 change: 1 addition & 0 deletions application/models/QuestionCreate.php
Expand Up @@ -22,6 +22,7 @@ public static function getInstance($iSurveyId, $type)
'type' => $questionType,
'other' => 'N',
'mandatory' => 'N',
'same_default' => 1,
'relevance' => 1,
'group_name' => '',
'modulename' => '',
Expand Down
Expand Up @@ -66,8 +66,12 @@
),
'onLabel'=>gT('Yes'),
'offLabel'=>gT('No'),
/*
'onColor'=> 'warning',
'offColor'=> 'primary'
*/
'onColor'=> 'primary',
'offColor'=> 'warning'
)
);
?>
Expand Down
Expand Up @@ -282,14 +282,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -350,14 +350,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -350,14 +350,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -417,14 +417,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -298,14 +298,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -427,14 +427,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -381,14 +381,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -524,14 +524,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -441,14 +441,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -381,14 +381,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -166,14 +166,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
8 changes: 4 additions & 4 deletions application/views/survey/questions/answer/date/config.xml
Expand Up @@ -310,14 +310,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
9 changes: 5 additions & 4 deletions application/views/survey/questions/answer/gender/config.xml
Expand Up @@ -258,14 +258,15 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>

</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -342,14 +342,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
8 changes: 4 additions & 4 deletions application/views/survey/questions/answer/language/config.xml
Expand Up @@ -143,14 +143,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -392,14 +392,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down
Expand Up @@ -330,14 +330,14 @@
<inputtype>switch</inputtype>
<sortorder>101</sortorder>
<options>
<option>
<value>1</value>
<text>Yes</text>
</option>
<option>
<value>0</value>
<text>No</text>
</option>
<option>
<value>1</value>
<text>Yes</text>
</option>
</options>
<help>Display a chart in the statistics?</help>
<caption>Display chart</caption>
Expand Down

1 comment on commit f371c4f

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Trischi80 : question : the order of yes/no make the default color ?

Please sign in to comment.