Skip to content

Commit

Permalink
Fixed issue #10491: Missing translation for on/off switches in statis…
Browse files Browse the repository at this point in the history
…tics
  • Loading branch information
c-schmitz committed Feb 17, 2016
1 parent acfb57f commit 5fa4472
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Expand Up @@ -19,14 +19,14 @@
<div class='form-group'>
<label class="col-sm-4 control-label" for='viewsummaryall'><?php eT("View summary of all available fields:"); ?></label>
<div class='col-sm-1'>
<input type='checkbox' id='viewsummaryall' name='viewsummaryall' <?php if (isset($_POST['viewsummaryall'])) { echo "checked='checked'";} ?> />
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'viewsummaryall', 'id'=>'viewsummaryall', 'value'=>(isset($_POST['viewsummaryall'])), 'onLabel'=>gT('On'),'offLabel'=>gT('Off')));?>
</div>
</div>

<div class='form-group'>
<label class="col-sm-4 control-label" id='noncompletedlbl' for='noncompleted' title='<?php eT("Count stats for each question based only on the total number of responses for which the question was displayed"); ?>'><?php eT("Subtotals based on displayed questions:"); ?></label>
<div class='col-sm-1'>
<input type='checkbox' id='noncompleted' name='noncompleted' <?php if (isset($_POST['noncompleted'])) {echo "checked='checked'"; } ?> />
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'noncompleted', 'id'=>'noncompleted', 'value'=>(isset($_POST['noncompleted'])), 'onLabel'=>gT('On'),'offLabel'=>gT('Off')));?>
</div>
</div>

Expand Down
Expand Up @@ -6,14 +6,14 @@
<div class='form-group'>
<label for='showtextinline' class="col-sm-5 control-label" ><?php eT("Show text responses inline:") ?></label>
<div class='col-sm-1'>
<input type='checkbox' id='showtextinline' name='showtextinline' <?php if(isset($showtextinline) && $showtextinline == 1) {echo "checked='checked'"; } ?> />
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'showtextinline', 'id'=>'showtextinline', 'value'=>($showtextinline==1), 'onLabel'=>gT('On'),'offLabel'=>gT('Off')));?>
</div>
</div>

<div class='form-group'>
<label for='usegraph' class="col-sm-5 control-label" ><?php eT("Show graphs:"); ?></label>
<div class='col-sm-1'>
<input type='checkbox' id='usegraph' name='usegraph' <?php if (isset($usegraph) && $usegraph == 1) { echo "checked='checked'"; } ?> />
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array('name' => 'usegraph', 'id'=>'usegraph', 'value'=>($usegraph==1), 'onLabel'=>gT('On'),'offLabel'=>gT('Off')));?>
</div>
<?php if($error != '') { echo "<div id='grapherror' style='display:none'>$error<hr /></div>"; } ?>
</div>
Expand All @@ -35,7 +35,7 @@
<div class='col-sm-5'>
<select name="charttype" id='charttype' class="form-control">
<option value="default" selected="selected"><?php eT("As defined in question settings");?></option>
<option value="0" ><?php eT('Bar chart');?></option>
<option value="0"><?php eT('Bar chart');?></option>
<option value="1"><?php eT('Pie chart');?></option>
<option value="2"><?php eT('Radar chart');?></option>
<option value="3"><?php eT('Line chart');?></option>
Expand Down
6 changes: 0 additions & 6 deletions scripts/admin/statistics.js
Expand Up @@ -179,12 +179,6 @@ $(document).ready(function() {
$('.chartjs-container').loadGraph();
}

$("[name='viewsummaryall']").bootstrapSwitch();
$("[name='noncompleted']").bootstrapSwitch();
$("[name='showtextinline']").bootstrapSwitch();
$("[name='usegraph']").bootstrapSwitch();


$('#generalfilters-chevron').click(function(){
toggleSection($('#generalfilters-chevron'), $('#statisticsgeneralfilters') );
});
Expand Down

0 comments on commit 5fa4472

Please sign in to comment.