Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 29, 2021
2 parents 740df63 + 423277e commit ef24332
Show file tree
Hide file tree
Showing 18 changed files with 41,001 additions and 40,745 deletions.
6 changes: 2 additions & 4 deletions application/controllers/SurveyAdministrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,12 @@ public function actionNewSurvey()
$arrayed_data['oSurvey'] = $survey;
$arrayed_data['data'] = $aData;
$arrayed_data['title_bar']['title'] = gT('New survey');
$arrayed_data['fullpagebar']['savebutton']['form'] = 'addnewsurvey';
$arrayed_data['fullpagebar']['closebutton']['url'] = 'admin/index'; // Close button

// Green Bar Page Title
$aData['pageTitle'] = "Create, import, or copy survey";
$aData['pageTitle'] = gT("Create a new survey");

$aData['fullpagebar']['savebutton']['form'] = 'addnewsurvey';
$aData['fullpagebar']['closebutton']['url'] = 'admin/index'; // Close button
//$aData['fullpagebar']['savebutton']['form'] = 'addnewsurvey';

$this->aData = $aData;

Expand Down
20 changes: 10 additions & 10 deletions application/views/admin/super/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ class='btn btn-default'
</a>
<?php endif; ?>

<!-- Save -->
<?php if(isset($fullpagebar['savebutton']['form'])):?>
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-floppy-o"></span>
<?php eT("Save");?>
<!-- Close -->
<?php if(isset($fullpagebar['closebutton']['url'])):?>
<a class="btn btn-default" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button" style="margin-top: 10px;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>

Expand All @@ -94,11 +94,11 @@ class='btn btn-default'
</a>
<?php endif; ?>

<!-- Close -->
<?php if(isset($fullpagebar['closebutton']['url'])):?>
<a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button" style="margin-top: 10px;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
<!-- Save -->
<?php if(isset($fullpagebar['savebutton']['form'])):?>
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-floppy-o"></span>
<?php eT("Save");?>
</a>
<?php endif;?>

Expand Down
20 changes: 10 additions & 10 deletions application/views/layouts/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<!-- Right actions -->
<div class="col-md-6 text-right" style="margin-bottom: 10px;">

<!-- Save -->
<?php if (isset($fullpagebar['savebutton']['form'])) :?>
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-floppy-o"></span>
<?php eT("Save");?>
<!-- Close -->
<?php if (isset($fullpagebar['closebutton']['url'])) :?>
<a class="btn btn-default" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button" style="margin-top: 10px;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>

Expand All @@ -44,11 +44,11 @@
</a>
<?php endif; ?>

<!-- Close -->
<?php if (isset($fullpagebar['closebutton']['url'])) :?>
<a class="btn btn-danger" href="<?php echo $fullpagebar['closebutton']['url']; ?>" role="button" style="margin-top: 10px;">
<span class="fa fa-close"></span>
<?php eT("Close");?>
<!-- Save -->
<?php if (isset($fullpagebar['savebutton']['form'])) :?>
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>" style="margin-top: 10px;">
<span class="fa fa-floppy-o"></span>
<?php eT("Save");?>
</a>
<?php endif;?>

Expand Down
292 changes: 148 additions & 144 deletions application/views/surveyAdministration/tabCopy_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,157 +3,161 @@
* Copy survey
*/
?>
<div class="ls-flex-row wrap align-content-center align-items-center">
<div class="container-fluid col-sm-10 col-md-8">
<!-- tab copy survey -->
<!-- copy survey form -->
<?php echo CHtml::form(array('surveyAdministration/copy'), 'post', array('id'=>'copysurveyform', 'name'=>'copysurveyform', 'class'=>'form30 ')); ?>
<div class="ls-flex-column col-md-6">
<!-- Select survey -->
<div class="form-group">
<label for='copysurveylist' class=" control-label"><?php eT("Select survey to copy:"); ?> </label>
<div class="">
<select id='copysurveylist' name='copysurveylist' required="required" class="form-control">
<?php echo getSurveyList(false); ?>
</select>
</div>
<div class="">
<p class="form-control-static">
<span class='annotation text-warning'><?php echo gT("Required"); ?> </span>
</p>
</div>
</div>
<div class="ls-flex-row">
<div class="grow-10 ls-space padding left-10 right-10">
<div class="row">

<!-- New survey title -->
<div class="form-group">
<label for='copysurveyname' class=" control-label"><?php echo eT("New survey title:"); ?> </label>
<div class="">
<input type='text' id='copysurveyname' size='82' maxlength='200' name='copysurveyname' value='' required="required" class="form-control" />
</div>
<div class="">
<p class="form-control-static">
<span class='annotation text-warning'><?php echo gT("Required"); ?> </span>
</p>
</div>
</div>
<!-- copy survey form -->
<?php echo CHtml::form(array('surveyAdministration/copy'), 'post', array('id'=>'copysurveyform', 'name'=>'copysurveyform', 'class'=>'form30 ')); ?>
<div class="ls-flex-column col-md-4">
<!-- Select survey -->
<div class="form-group">
<label for='copysurveylist' class=" control-label"><?php eT("Select survey to copy:"); ?> </label>
<div class="">
<select id='copysurveylist' name='copysurveylist' required="required" class="form-control">
<?php echo getSurveyList(false); ?>
</select>
</div>
<p class="form-control-static">
<span class='annotation text-warning'><?php echo gT("Required"); ?> </span>
</p>
</div>

<!-- New survey id -->
<div class="form-group">
<label class=" control-label" for='copysurveyid'><?php echo eT("New survey id:"); ?> </label>
<div class="">
<input type='number' step="1" min="1" max="999999" id='copysurveyid' size='82' name='copysurveyid' value='' class="form-control" />
</div>
<div class="">
<p class="form-control-static">
<span class='annotation text-info'><?php echo gT("Optional"); ?> </span>
</p>
</div>
</div>
</div>
<div class="ls-flex-column col-md-6">
<!-- Convert resource links -->
<div class="form-group">
<label class=" control-label" for='copysurveytranslinksfields'><?php echo eT("Convert resource links and expression fields?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveytranslinksfields',
'value'=> "1",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<!-- New survey title -->
<div class="form-group">
<label for='copysurveyname' class=" control-label"><?php echo eT("New survey title:"); ?> </label>
<div class="">
<input type='text' id='copysurveyname' size='82' maxlength='200' name='copysurveyname' value='' required="required" class="form-control" />
</div>
<div class="">
<p class="form-control-static">
<span class='annotation text-warning'><?php echo gT("Required"); ?> </span>
</p>
</div>
</div>

<!-- Exclude quotas -->
<div class="form-group">
<label class=" control-label" for='copysurveyexcludequotas'><?php echo eT("Exclude quotas?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyexcludequotas',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<!-- New survey id -->
<div class="form-group">
<label class=" control-label" for='copysurveyid'><?php echo eT("New survey id:"); ?> </label>
<div class="">
<input type='number' step="1" min="1" max="999999" id='copysurveyid' size='82' name='copysurveyid' value='' class="form-control" />
</div>
<div class="">
<p class="form-control-static">
<span class='annotation text-info'><?php echo gT("Optional"); ?> </span>
</p>
</div>
</div>
<div class="form-group">
<!-- Submit -->
<div class="text-center">
<input type='submit' class='btn btn-primary col-4' value='<?php eT("Copy survey"); ?>' />
<?php if (isset($surveyid)) echo '<input type="hidden" name="sid" value="' . $surveyid . '" />'; ?>
<input type='hidden' name='action' value='copysurvey' />
</div>
</div>
</div>

<!-- Exclude survey permissions -->
<div class="form-group">
<label class=" control-label" for='copysurveyexcludepermissions'><?php echo eT("Exclude survey permissions?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyexcludepermissions',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<div class="ls-flex-column col-md-4">
<!-- Convert resource links -->
<div class="form-group">
<label class=" control-label" for='copysurveytranslinksfields'><?php echo eT("Convert resource links and expression fields?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveytranslinksfields',
'value'=> "1",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

<!-- Exclude answers -->
<div class="form-group">
<label class=" control-label" for='copysurveyexcludeanswers'><?php echo eT("Exclude answers?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyexcludeanswers',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<!-- Exclude quotas -->
<div class="form-group">
<label class=" control-label" for='copysurveyexcludequotas'><?php echo eT("Exclude quotas?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyexcludequotas',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

<!-- Reset conditions/relevance -->
<div class="form-group">
<label class=" control-label" for='copysurveyresetconditions'><?php echo eT("Reset conditions?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyresetconditions',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<!-- Exclude survey permissions -->
<div class="form-group">
<label class=" control-label" for='copysurveyexcludepermissions'><?php echo eT("Exclude survey permissions?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyexcludepermissions',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

<!-- Reset start/end date/time -->
<div class="form-group">
<label class=" control-label" for='copysurveyresetstartenddate'><?php echo eT("Reset start/end date/time?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyresetstartenddate',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<div class="form-group">
<label class=" control-label" for='copysurveyresetresponsestartid'><?php echo eT("Reset response start ID?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyresetresponsestartid',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
</div>
<!-- Exclude answers -->
<div class="form-group">
<label class=" control-label" for='copysurveyexcludeanswers'><?php echo eT("Exclude answers?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyexcludeanswers',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

<!-- Submit -->
<div class="text-center">
<input type='submit' class='btn btn-primary col-6' value='<?php eT("Copy survey"); ?>' />
<?php if (isset($surveyid)) echo '<input type="hidden" name="sid" value="' . $surveyid . '" />'; ?>
<input type='hidden' name='action' value='copysurvey' />
</div>
</form>
<!-- Reset conditions/relevance -->
<div class="form-group">
<label class=" control-label" for='copysurveyresetconditions'><?php echo eT("Reset conditions?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyresetconditions',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

<!-- Reset start/end date/time -->
<div class="form-group">
<label class=" control-label" for='copysurveyresetstartenddate'><?php echo eT("Reset start/end date/time?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyresetstartenddate',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

<div class="form-group">
<label class=" control-label" for='copysurveyresetresponsestartid'><?php echo eT("Reset response start ID?"); ?> </label>
<div class="">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'copysurveyresetresponsestartid',
'value'=> "0",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>

</div>
</form>
</div>
</div>
</div>

0 comments on commit ef24332

Please sign in to comment.