Skip to content

Commit

Permalink
Dev: Remove unnecessary divs in active survey jumbo
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 21, 2016
1 parent d6cf11b commit 6d4e1d5
Showing 1 changed file with 107 additions and 129 deletions.
236 changes: 107 additions & 129 deletions application/views/admin/survey/activateSurvey_view.php
Expand Up @@ -41,182 +41,160 @@
<?php else:?>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<div class='container message-box col-sm-10'>
<div class='row'>
<h2 class='col-sm-7 col-sm-offset-2'><?php eT("Warning: Please read this carefully before proceeding!"); ?></h2>
</div>
<div class='row'>
<p class="lead col-sm-7 col-sm-offset-2">
<?php eT("You should only activate a survey when you are absolutely certain that your survey setup is finished and will not need changing."); ?>
</p>
</div>
<div class='row'>
<p class="col-sm-7 col-sm-offset-2">
<?php eT("Once a survey is activated you can no longer:"); ?>
</p>
<div class='col-sm-6 col-sm-offset-4'>
<ul class=''>
<li><?php eT("Add or delete groups"); ?></li>
<li><?php eT("Add or delete questions"); ?></li>
<li><?php eT("Add or delete subquestions or change their codes"); ?></li>
</ul>
</div>
<div class='container message-box col-sm-12'>

<h2 class='col-sm-7 col-sm-offset-2'><?php eT("Warning: Please read this carefully before proceeding!"); ?></h2>

<p class="lead col-sm-7 col-sm-offset-2">
<?php eT("You should only activate a survey when you are absolutely certain that your survey setup is finished and will not need changing."); ?>
</p>
<p class="col-sm-7 col-sm-offset-2">
<?php eT("Once a survey is activated you can no longer:"); ?>
</p>
<div class='col-sm-6 col-sm-offset-4'>
<ul class=''>
<li><?php eT("Add or delete groups"); ?></li>
<li><?php eT("Add or delete questions"); ?></li>
<li><?php eT("Add or delete subquestions or change their codes"); ?></li>
</ul>
</div>

<div class='row'>
<div class="col-sm-7 col-sm-offset-2"><p><strong>
<?php eT("Additionally the following settings cannot be changed when the survey is active.");?>
</strong><br><?php eT("Please check these settings now:");?></p></div>
</div>
<div class="col-sm-7 col-sm-offset-2"><p><strong>
<?php eT("Additionally the following settings cannot be changed when the survey is active.");?>
</strong><br><?php eT("Please check these settings now:");?></p></div>

<?php echo CHtml::form(array("admin/survey/sa/activate/surveyid/{$surveyid}/"), 'post', array('class'=>'form-horizontal')); ?>
<div class='row'>
<div class="col-sm-3 col-sm-offset-2">
<div class="row">
<div class='form-group'>
<label for='anonymized' class='control-label col-sm-7'>
<?php eT("Anonymized responses?"); ?>
<script type="text/javascript">
<!--
function alertPrivacy()
<div class='form-group'>
<label for='anonymized' class='control-label col-sm-7'>
<?php eT("Anonymized responses?"); ?>
<script type="text/javascript">
<!--
function alertPrivacy()
{
if (document.getElementById('anonymized').value == 'Y')
{
if (document.getElementById('anonymized').value == 'Y')
{
alert('<?php eT("Warning"); ?>: <?php eT("If you turn on the -Anonymized responses- option and create a tokens table, LimeSurvey will mark your completed tokens only with a 'Y' instead of date/time to ensure the anonymity of your participants.","js"); ?>');
}
alert('<?php eT("Warning"); ?>: <?php eT("If you turn on the -Anonymized responses- option and create a tokens table, LimeSurvey will mark your completed tokens only with a 'Y' instead of date/time to ensure the anonymity of your participants.","js"); ?>');
}
//-->
</script>
</label>

<?php /*$this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'anonymizedazd',
'htmlOptions' => array(
'id' => 'anonymizedazd',
)
)); */ ?>

<div class='col-sm-5'>
<select id='anonymized' class='form-control' name='anonymized' onchange='alertPrivacy();'>
<option value='Y'
<?php if ($aSurveysettings['anonymized'] == "Y") { ?>
}
//-->
</script>
</label>

<?php /*$this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'anonymizedazd',
'htmlOptions' => array(
'id' => 'anonymizedazd',
)
)); */ ?>

<div class='col-sm-5'>
<select id='anonymized' class='form-control' name='anonymized' onchange='alertPrivacy();'>
<option value='Y'
<?php if ($aSurveysettings['anonymized'] == "Y") { ?>
selected='selected'
<?php } ?>
><?php eT("Yes"); ?></option>
<option value='N'
<?php if ($aSurveysettings['anonymized'] != "Y") { ?>
selected='selected'
<?php } ?>
><?php eT("Yes"); ?></option>
<option value='N'
<?php if ($aSurveysettings['anonymized'] != "Y") { ?>
selected='selected'
<?php } ?>
><?php eT("No"); ?></option>
</select>
</div>
><?php eT("No"); ?></option>
</select>
</div>
</div>
</div>

<div class="col-sm-3">
<div class="row">
<div class='form-group'>
<label for='datestamp' class='control-label col-sm-7'>
<?php eT("Date stamp?"); ?>
</label>
<div class='col-sm-5'>
<select id='datestamp' class='form-control' name='datestamp' onchange='alertDateStampAnonymization();'>
<option value='Y' <?php if ($aSurveysettings['datestamp'] == "Y"){echo 'selected="selected"';}?>>
<?php eT("Yes"); ?>
</option>

<option value='N' <?php if ($aSurveysettings['datestamp'] != "Y"){echo "selected='selected'";}?>>
<?php eT("No"); ?>
</option>
</select>
</div>
<div class='form-group'>
<label for='datestamp' class='control-label col-sm-7'>
<?php eT("Date stamp?"); ?>
</label>
<div class='col-sm-5'>
<select id='datestamp' class='form-control' name='datestamp' onchange='alertDateStampAnonymization();'>
<option value='Y' <?php if ($aSurveysettings['datestamp'] == "Y"){echo 'selected="selected"';}?>>
<?php eT("Yes"); ?>
</option>

<option value='N' <?php if ($aSurveysettings['datestamp'] != "Y"){echo "selected='selected'";}?>>
<?php eT("No"); ?>
</option>
</select>
</div>
</div>
</div>
</div>

<div class='row'>
<div class="col-sm-3 col-sm-offset-2">
<div class="row">
<div class='form-group'>
<label for='ipaddr' class='control-label col-sm-7'>
<?php eT("Save IP address?"); ?>
</label>

<div class='col-sm-5'>
<select name='ipaddr' id='ipaddr' class='form-control'>
<option value='Y' <?php if ($aSurveysettings['ipaddr'] == "Y") {echo "selected='selected'";} ?>>
<?php eT("Yes"); ?>
</option>
<option value='N' <?php if ($aSurveysettings['ipaddr'] != "Y") { echo "selected='selected'";} ?>>
<?php eT("No"); ?>
</option>
</select>
</div>
<div class='form-group'>
<label for='ipaddr' class='control-label col-sm-7'>
<?php eT("Save IP address?"); ?>
</label>

<div class='col-sm-5'>
<select name='ipaddr' id='ipaddr' class='form-control'>
<option value='Y' <?php if ($aSurveysettings['ipaddr'] == "Y") {echo "selected='selected'";} ?>>
<?php eT("Yes"); ?>
</option>
<option value='N' <?php if ($aSurveysettings['ipaddr'] != "Y") { echo "selected='selected'";} ?>>
<?php eT("No"); ?>
</option>
</select>
</div>
</div>
</div>

<div class="col-sm-3">
<div class="row">

<div class='form-group'>
<label class='control-label col-sm-7' for='refurl'><?php eT("Save referrer URL?"); ?></label>
<div class='col-sm-5'>
<select class='form-control' name='refurl' id='refurl'>
<option value='Y' <?php if ($aSurveysettings['refurl'] == "Y"){echo "selected='selected'";} ?>>
<?php eT("Yes"); ?>
</option>
<option value='N' <?php if ($aSurveysettings['refurl'] != "Y") {echo "selected='selected'";} ?>>
<?php eT("No"); ?>
</option>
</select>
</div>
<div class='form-group'>
<label class='control-label col-sm-7' for='refurl'><?php eT("Save referrer URL?"); ?></label>
<div class='col-sm-5'>
<select class='form-control' name='refurl' id='refurl'>
<option value='Y' <?php if ($aSurveysettings['refurl'] == "Y"){echo "selected='selected'";} ?>>
<?php eT("Yes"); ?>
</option>
<option value='N' <?php if ($aSurveysettings['refurl'] != "Y") {echo "selected='selected'";} ?>>
<?php eT("No"); ?>
</option>
</select>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-3 col-sm-offset-2">
<div class="row">
<div class='form-group'>
<label class='control-label col-sm-7' for='savetimings'><?php eT("Save timings?"); ?></label>
<div class='col-sm-5'>
<select class='form-control' id='savetimings' name='savetimings'>
<option value='Y' <?php if (!isset($aSurveysettings['savetimings']) || !$aSurveysettings['savetimings'] || $aSurveysettings['savetimings'] == "Y") { ?> selected='selected' <?php } ?>>
<?php eT("Yes"); ?>
</option>

<option value='N' <?php if (isset($aSurveysettings['savetimings']) && $aSurveysettings['savetimings'] == "N") { ?> selected='selected' <?php } ?>>
<?php eT("No"); ?>
</option>
</select>
</div>
</div>
<div class="col-sm-3 col-sm-offset-2">
<div class='form-group'>
<label class='control-label col-sm-7' for='savetimings'><?php eT("Save timings?"); ?></label>
<div class='col-sm-5'>
<select class='form-control' id='savetimings' name='savetimings'>
<option value='Y' <?php if (!isset($aSurveysettings['savetimings']) || !$aSurveysettings['savetimings'] || $aSurveysettings['savetimings'] == "Y") { ?> selected='selected' <?php } ?>>
<?php eT("Yes"); ?>
</option>

<option value='N' <?php if (isset($aSurveysettings['savetimings']) && $aSurveysettings['savetimings'] == "N") { ?> selected='selected' <?php } ?>>
<?php eT("No"); ?>
</option>
</select>
</div>
</div>
</div>

<div class='row'>

<p class='col-sm-7 col-sm-offset-2'>
<?php eT("Please note that once responses have collected with this survey and you want to add or remove groups/questions or change one of the settings above, you will need to deactivate this survey, which will move all data that has already been entered into a separate archived table."); ?><br /><br />
</p>
</div>
<div class='row'>

<div class='col-sm-6 col-sm-offset-4'>
<input type='hidden' name='ok' value='Y' />
<input type='submit' class="btn btn-success btn-lg " value="<?php eT("Save & activate survey"); ?>" />
<a class="btn btn-default btn-lg" href="<?php echo $this->createUrl("admin/survey/sa/view/surveyid/$surveyid"); ?>" role="button">
<?php eT("Cancel"); ?>
</a>
</p>
</div>
</div>

<div class='col-sm-12'>&nbsp;</div>

</form>
</div>
</div>
</div>
<?php endif;?>

0 comments on commit 6d4e1d5

Please sign in to comment.