Skip to content

Commit

Permalink
Dev: separating common js var between answer/subquestions options
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 11, 2016
1 parent 2d5c802 commit 63085ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
@@ -1,7 +1,6 @@
<script type='text/javascript'>assessmentvisible=<?php echo $assessmentvisible?'true':'false'; ?>;
var cancel = '<?php eT('Cancel'); ?>';
var check = true;
var duplicateanswercode='<?php eT('Error: You are trying to use duplicate answer codes.','js'); ?>';
var lafail = '<?php eT('Sorry, the request failed!'); ?>';
var lanameurl = '<?php echo Yii::app()->createUrl('/admin/labels/sa/getAllSets'); ?>';
var langs='<?php echo implode(';',$anslangs); ?>';
Expand All @@ -14,16 +13,18 @@
var newansweroption_text='<?php eT('New answer option','js'); ?>';
var ok = '<?php eT('Ok'); ?>';
var quickaddtitle='<?php eT('Quick-add answers','js'); ?>';
var sAssessmentValue='<?php eT('Assessment value','js'); ?>';
var saveaslabletitle = '<?php eT('Save as label set','js'); ?>';
var scalecount=<?php echo $scalecount; ?>;
var sCheckLabelURL = '<?php echo Yii::app()->createUrl('/admin/questions/sa/ajaxchecklabel'); ?>';
var sImageURL ="<?php echo Yii::app()->getConfig('adminimageurl'); ?>";
var sImageURL ='<?php echo Yii::app()->getConfig('adminimageurl'); ?>';
var sLabelSetName='<?php eT('Label set name','js'); ?>';
var strCantDeleteLastAnswer='<?php eT('You cannot delete the last answer option.','js'); ?>';
var strcode='<?php eT('Code','js'); ?>';
var strlabel='<?php eT('Label','js'); ?>';
var strNoLabelSet='<?php eT('There are no label sets which match the survey default language','js'); ?>';

var duplicateanswercode='<?php eT('Error: You are trying to use duplicate answer codes.','js'); ?>';
var sAssessmentValue='<?php eT('Assessment value','js'); ?>';
var scalecount=<?php echo $scalecount; ?>;
</script>

<div class="side-body" id="edit-question-body">
Expand Down
5 changes: 3 additions & 2 deletions application/views/admin/survey/Question/subQuestion_view.php
@@ -1,7 +1,6 @@
<script type='text/javascript'>
var cancel = '<?php eT('Cancel'); ?>';
var check = true;
var duplicatesubquestioncode='<?php eT('Error: You are trying to use duplicate subquestion codes.','js'); ?>';
var lafail = '<?php eT('Sorry, the request failed!'); ?>';
var lanameurl = '<?php echo Yii::app()->createUrl('/admin/labels/sa/getAllSets'); ?>';
var langs='<?php echo implode(';',$anslangs); ?>';
Expand All @@ -13,7 +12,6 @@
var lspickurl = '<?php echo Yii::app()->createUrl('/admin/questions/sa/ajaxlabelsetpicker'); ?>';
var newansweroption_text='<?php eT('New subquestion','js'); ?>';
var ok = '<?php eT('Ok'); ?>';
var otherisreserved='<?php ($aParentQuestion['other']=="Y") ? printf(gT("'%s' can not be used if question allow other.",'js'),'other') : ""; ?>';
var quickaddtitle='<?php eT('Quick-add subquestions','js'); ?>';
var saveaslabletitle = '<?php eT('Save as label set','js'); ?>';
var sCheckLabelURL = '<?php echo Yii::app()->createUrl('/admin/questions/sa/ajaxchecklabel'); ?>';
Expand All @@ -23,6 +21,9 @@
var strcode='<?php eT('Code','js'); ?>';
var strlabel='<?php eT('Label','js'); ?>';
var strNoLabelSet='<?php eT('There are no label sets which match the survey default language','js'); ?>';

var duplicatesubquestioncode='<?php eT('Error: You are trying to use duplicate subquestion codes.','js'); ?>';
var otherisreserved='<?php ($aParentQuestion['other']=="Y") ? printf(gT("'%s' can not be used if question allow other.",'js'),'other') : ""; ?>';
</script>
<?php echo PrepareEditorScript(); ?>

Expand Down

0 comments on commit 63085ff

Please sign in to comment.