Skip to content

Commit

Permalink
Merge branch '2.5' of https://github.com/LimeSurvey/LimeSurvey into 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
louis committed Sep 28, 2015
2 parents 877442a + 503aac6 commit 746d7d7
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 62 deletions.
Expand Up @@ -57,7 +57,7 @@ define('ace/mode/diff_highlight_rules', ['require', 'exports', 'module' , 'ace/l
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;

var DiffHighlightRules = function() {
var DiffHighlightRules = function() {

this.$rules = {
"start" : [{
Expand Down
Expand Up @@ -148,9 +148,8 @@

<div id='MandatorySelection' class="form-group">
<label class="col-sm-4 control-label"><?php eT("Mandatory:"); ?></label>
<!-- 'value'=>($eqrow['mandatory'] == "Y") -->
<div class="col-sm-8">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'mandatory', 'value'=> '0' ));?>
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'mandatory', 'value'=> $eqrow['mandatory'] === "Y"));?>
</div>
</div>

Expand Down
Expand Up @@ -31,58 +31,59 @@
<div id="<?php echo $eqrow['language']; ?>" class="tab-pane fade in active">

<!-- Question Code -->
<div class="form-group col-sm-12" style="padding-left: 0px;">
<label class="col-sm-1 control-label" for='title' style="padding-left: 0px;">
<?php eT("Code:"); ?>
</label>
<div class="col-sm-4" style="padding-left: 0px;">
<input type='text' autofocus="autofocus" size='20' maxlength='20' id='title' required='required' name='title' pattern='<?php echo $sPattern ?>' value="<?php echo $eqrow['title']; ?>" />
</div>
<div class="col-sm-1" style="padding-left: 0px;">
<span class='text-warning'><?php eT("Required"); ?> </span>
<div class="form-group">
<div class="col-lg-offset-1">
<label class="col-sm-1 control-label" for='title'><?php eT("Code:"); ?></label>

<div class="col-sm-5">
<input class="form-control" type='text' autofocus="autofocus" size='20' maxlength='20' id='title' required='required' name='title' pattern='<?php echo $sPattern ?>' value="<?php echo $eqrow['title']; ?>" />
</div>
<div class="col-sm-6">
<span class='text-warning'><?php eT("Required"); ?> </span>
</div>
</div>
</div>

<!-- Question Text -->
<div class="form-group">
<label for='question_<?php echo $eqrow['language']; ?>' class=""> <?php eT("Question:"); ?></label>
<div class='htmleditor' >
<textarea cols='80' rows='100' id='question_<?php echo $eqrow['language']; ?>' name='question_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['question']; ?></textarea>
<div class="col-lg-offset-1">
<label class="control-label" for='question_<?php echo $eqrow['language']; ?>' class=""> <?php eT("Question:"); ?></label>
<textarea cols='80' rows='100' id='question_<?php echo $eqrow['language']; ?>' name='question_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['question']; ?></textarea>
<?php echo getEditor("question-text","question_".$eqrow['language'], "[".gT("Question:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
<?php echo getEditor("question-text","question_".$eqrow['language'], "[".gT("Question:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>

<!-- Question Help -->
<div class="form-group">
<label for='help_<?php echo $eqrow['language']; ?>' class=""><?php eT("Help:"); ?></label>

<div class='htmleditor' >
<textarea cols='45' rows='4' id='help_<?php echo $eqrow['language']; ?>' name='help_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['help']; ?></textarea>
<div class="col-lg-offset-1">
<label class="control-label" for='help_<?php echo $eqrow['language']; ?>' class=""><?php eT("Help:"); ?></label>
<textarea cols='45' rows='4' id='help_<?php echo $eqrow['language']; ?>' name='help_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['help']; ?></textarea>
<?php echo getEditor("question-help","help_".$eqrow['language'], "[".gT("Help:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
<?php echo getEditor("question-help","help_".$eqrow['language'], "[".gT("Help:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
</div>

<!-- Other languages tab-panes -->
<?php foreach ($addlanguages as $addlanguage): ?>
<div id="<?php echo $addlanguage; ?>" class="tab-pane fade">


<!-- Question Text -->
<div class="form-group">
<label for='question_<?php echo $addlanguage; ?>'><?php eT("Question:"); ?></label>
<div class='htmleditor' >
<textarea cols='80' rows='4' id='question_<?php echo $addlanguage; ?>' name='question_<?php echo $addlanguage; ?>'></textarea>
<div class="col-lg-offset-1">
<label class="control-label" for='question_<?php echo $addlanguage; ?>'><?php eT("Question:"); ?></label>
<div class='htmleditor' >
<textarea cols='80' rows='4' id='question_<?php echo $addlanguage; ?>' name='question_<?php echo $addlanguage; ?>'></textarea>
</div>
<?php echo getEditor("question-text","question_".$addlanguage, "[".gT("Question:", "js")."](".$addlanguage.")",$surveyid,$gid,$qid,$action); ?>
</div>
<?php echo getEditor("question-text","question_".$addlanguage, "[".gT("Question:", "js")."](".$addlanguage.")",$surveyid,$gid,$qid,$action); ?>
</div>

<!-- Question Help -->
<div class="form-group">
<label for='help_<?php echo $addlanguage; ?>'><?php eT("Help:"); ?></label>
<div class='htmleditor'>
<div class="col-lg-offset-1">
<label for='help_<?php echo $addlanguage; ?>'><?php eT("Help:"); ?></label>
<textarea cols='45' rows='4' id='help_<?php echo $addlanguage; ?>' name='help_<?php echo $addlanguage; ?>'></textarea>
<?php echo getEditor("question-help","help_".$addlanguage, "[".gT("Help:", "js")."](".$addlanguage.")",$surveyid,$gid,$qid,$action); ?>
<?php echo getEditor("question-help","help_".$addlanguage, "[".gT("Help:", "js")."](".$addlanguage.")",$surveyid,$gid,$qid,$action); ?>
</div>
</div>
</div>
Expand All @@ -93,4 +94,4 @@
<div id='questionactioncopy' class='extra-action'>
<button type='submit' class="saveandreturn hidden" name="redirection" value="edit"><?php eT("Save") ?> </button>
<input type='submit' class="hidden" value='<?php eT("Save and close"); ?>' />
</div>
</div>
41 changes: 24 additions & 17 deletions application/views/admin/survey/Question/newQuestion_view.php
Expand Up @@ -46,10 +46,7 @@
<div class="panel-body">
<div>
<div class="form-group">
<label for='question_type_button'>
<?php eT("Question Type:"); ?>
</label>
<br/>
<label class="col-sm-4 control-label" for='question_type_button'><?php eT("Question Type:"); ?></label>
<?php if($selectormodeclass!="none"): ?>
<?php
foreach (getQuestionTypeList($eqrow['type'], 'array') as $key=> $questionType)
Expand All @@ -64,7 +61,7 @@

<input type="hidden" id="question_type" name="type" value="<?php echo $eqrow['type']; ?>" />

<div class="btn-group" id="question_type_button" style="z-index: 1000">
<div class="col-sm-8 btn-group" id="question_type_button" style="z-index: 1000">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="z-index: 1000">
<?php foreach($groups as $name => $group):?>
<?php foreach($group as $type => $option):?>
Expand Down Expand Up @@ -112,31 +109,41 @@
</div>

<div class="form-group">
<label for='gid'><?php eT("Question group:"); ?></label>
<select name='gid' id='gid' class="form-control">
<?php echo getGroupList3($eqrow['gid'],$surveyid); ?>
</select>
<label class="col-sm-4 control-label" for='gid'><?php eT("Question group:"); ?></label>
<div class="col-sm-8">
<select name='gid' id='gid' class="form-control">
<?php echo getGroupList3($eqrow['gid'],$surveyid); ?>
</select>
</div>
</div>

<div class="form-group" id="OtherSelection">
<label><?php eT("Option 'Other':"); ?></label>
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'optionother'));?>
<label class="col-sm-4 control-label"><?php eT("Option 'Other':"); ?></label>
<div class="col-sm-8">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'optionother'));?>
</div>
</div>

<div id='MandatorySelection' class="form-group">
<label><?php eT("Mandatory:"); ?></label>
<label class="col-sm-4 control-label"><?php eT("Mandatory:"); ?></label>
<!-- 'value'=>($eqrow['mandatory'] == "Y") -->
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'mandatory', 'value'=> '0' ));?>
<div class="col-sm-8">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'mandatory', 'value'=> '0' ));?>
</div>
</div>

<div class="form-group">
<label for='relevance'><?php eT("Relevance equation:"); ?></label>
<textarea cols='1' class="form-control" rows='1' id='relevance' name='relevance' ></textarea>
<label class="col-sm-4 control-label" for='relevance'><?php eT("Relevance equation:"); ?></label>
<div class="col-sm-8">
<textarea cols='1' class="form-control" rows='1' id='relevance' name='relevance' ></textarea>
</div>
</div>

<div id='Validation' class="form-group">
<label for='preg'><?php eT("Validation:"); ?></label>
<input type='text' id='preg' name='preg' size='50' value="<?php echo $eqrow['preg']; ?>" />
<label class="col-sm-4 control-label" for='preg'><?php eT("Validation:"); ?></label>
<div class="col-sm-8">
<input type='text' id='preg' name='preg' size='50' value="<?php echo $eqrow['preg']; ?>" />
</div>
</div>
</div>
</div>
Expand Down
Expand Up @@ -31,15 +31,15 @@
<div id="<?php echo $eqrow['language']; ?>" class="tab-pane fade in active">

<!-- Question Code -->
<div class="form-group" style="">
<div class="form-group">
<div class="col-lg-offset-1">
<label class="col-sm-1 control-label" for='title'><?php eT("Code:"); ?></label>

<div class="col-sm-5" style="">
<div class="col-sm-5">
<input class="form-control" type='text' autofocus="autofocus" size='20' maxlength='20' id='title' required='required' name='title' pattern='<?php echo $sPattern ?>' value="<?php echo $eqrow['title']; ?>" />
</div>

<div class="col-sm-6" style="">
<div class="col-sm-6">
<span class='text-warning'><?php eT("Required"); ?> </span>
</div>
</div>
Expand All @@ -50,12 +50,8 @@
<div class="col-lg-offset-1">
<label class="control-label" for='question_<?php echo $eqrow['language']; ?>' class=""><?php eT("Question:"); ?></label>

<div class="">
<div class=''>
<textarea cols='80' rows='100' id='question_<?php echo $eqrow['language']; ?>' name='question_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['question']; ?></textarea>
</div>
<?php echo getEditor("question-text","question_".$eqrow['language'], "[".gT("Question:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
<textarea cols='80' rows='100' id='question_<?php echo $eqrow['language']; ?>' name='question_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['question']; ?></textarea>
<?php echo getEditor("question-text","question_".$eqrow['language'], "[".gT("Question:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
</div>

Expand All @@ -64,12 +60,8 @@
<div class="col-lg-offset-1">
<label class="control-label" for='help_<?php echo $eqrow['language']; ?>'><?php eT("Help:"); ?></label>

<div class="">
<div class='' >
<textarea cols='45' rows='4' id='help_<?php echo $eqrow['language']; ?>' name='help_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['help']; ?></textarea>
</div>
<?php echo getEditor("question-help","help_".$eqrow['language'], "[".gT("Help:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
<textarea cols='45' rows='4' id='help_<?php echo $eqrow['language']; ?>' name='help_<?php echo $eqrow['language']; ?>'><?php echo $eqrow['help']; ?></textarea>
<?php echo getEditor("question-help","help_".$eqrow['language'], "[".gT("Help:", "js")."](".$eqrow['language'].")",$surveyid,$gid,$qid,$action); ?>
</div>
</div>
</div>
Expand Down

0 comments on commit 746d7d7

Please sign in to comment.