Skip to content

Commit

Permalink
Dev: corrected labels on survey settings pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikvitt committed Jan 9, 2019
1 parent 911ab04 commit 149db0e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion application/core/LsDefaultDataSets.php
Expand Up @@ -184,7 +184,7 @@ public static function getTemplateConfigurationData()
'files_css' => '{"add":["css/ajaxify.css","css/animate.css","css/variations/sea_green.css","css/theme.css","css/custom.css"]}',
'files_js' => '{"add":["scripts/theme.js","scripts/ajaxify.js","scripts/custom.js"]}',
'files_print_css' => '{"add":["css/print_theme.css"]}',
'options' => '{"ajaxmode":"on","brandlogo":"on","brandlogofile":"themes/survey/fruity/files/logo.png","container":"on","backgroundimage":"off","backgroundimagefile":null,"animatebody":"off","bodyanimation":"fadeInRight","bodyanimationduration":"500","animatequestion":"off","questionanimation":"flipInX","questionanimationduration":"500","animatealert":"off","alertanimation":"shake","alertanimationduration":"500","font":"noto","bodybackgroundcolor":"#ffffff","fontcolor":"#444444","questionbackgroundcolor":"#ffffff","questionborder":"on","questioncontainershadow":"on","checkicon":"f00c","animatecheckbox":"on","checkboxanimation":"rubberBand","checkboxanimationduration":"500","animateradio":"on","radioanimation":"zoomIn","radioanimationduration":"500","zebrastriping":"off","stickymatrixheaders":"off","greyoutselected":"off","hideprivacyinfo":"off","crosshover":"off","showpopups":"1", "showclearall":"off", "questionhelptextposition":"top"}',
'options' => '{"ajaxmode":"on","brandlogo":"on","brandlogofile":"themes/survey/fruity/files/logo.png","container":"on","backgroundimage":"off","backgroundimagefile":null,"animatebody":"off","bodyanimation":"fadeInRight","bodyanimationduration":"500","animatequestion":"off","questionanimation":"flipInX","questionanimationduration":"500","animatealert":"off","alertanimation":"shake","alertanimationduration":"500","font":"noto","bodybackgroundcolor":"#ffffff","fontcolor":"#444444","questionbackgroundcolor":"#ffffff","questionborder":"on","questioncontainershadow":"on","checkicon":"f00c","animatecheckbox":"on","checkboxanimation":"rubberBand","checkboxanimationduration":"500","animateradio":"on","radioanimation":"zoomIn","radioanimationduration":"500","zebrastriping":"off","stickymatrixheaders":"off","greyoutselected":"off","hideprivacyinfo":"off","crosshover":"off","showpopups":"1", "showclearall":"off", "questionhelptextposition":"top","notables":"1"}',
'cssframework_name' => 'bootstrap',
'cssframework_css' => '{}',
'cssframework_js' => '',
Expand Down
12 changes: 7 additions & 5 deletions application/models/TemplateConfiguration.php
Expand Up @@ -861,11 +861,13 @@ public function getOptionPage()
$oOptions = (array) $oSimpleInheritanceTemplate->oOptions;
// translation of database values, to match labels on the page
foreach ($oOptions as $key=>$value){
if ($key == 'showpopups'){
$oOptions[$key] = str_replace(array('1', '0', '-1'), array(gT("Popup"), gT("On page"), gT("No")), $value);
} else {
$oOptions[$key] = str_replace(array('on', 'off', 'top', 'bottom'), array(gT("Yes"), gT("No"), gT("Top"), gT("Bottom")), $value);
}
if ($key == 'showpopups'){
$oOptions[$key] = str_replace(array('1', '0', '-1'), array(gT("Popup"), gT("On page"), gT("No")), $value);
} elseif ($key == 'notables'){
$oOptions[$key] = str_replace(array('2', '1', '0'), array(gT("Always on"), gT("Small screens"), gT("Off")), $value);
} else {
$oOptions[$key] = str_replace(array('on', 'off', 'top', 'bottom'), array(gT("Yes"), gT("No"), gT("Top"), gT("Bottom")), $value);
}
}

//We add some extra values to the option page
Expand Down
Expand Up @@ -42,7 +42,8 @@
<div class="">
<input type='text' class="form-control selector-numerical-input" value="<?php echo $oSurvey->navigationdelay; ?>" name='navigationdelay' id='navigationdelay' size='12' maxlength='2' onkeypress="returnwindow.LS.goodchars(event,'0123456789')" />
<?php if ($bShowInherited){ ?>
<span class='annotation'> <?php echo ' ['. eT("Inherited value:") . $oSurveyOptions->navigationdelay . ']'; ?></span>
<span class='annotation'> <?php echo ' ['. eT("Inherited value:") . $oSurveyOptions->navigationdelay . ']'; ?></span></br>
<span class='annotation'> <?php echo eT("Set this field to -1 to apply inherited value."); ?></span>
<?php } ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/survey/fruity/options/options.twig
Expand Up @@ -673,7 +673,7 @@
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
<label class="btn btn-default">
<input type='radio' name='notables' value='inherit' class='selector_option_radio_field simple_edit_options_notables ' data-id='notables'/>
{{ gT("Inherit") }}
{{ gT("Inherit") }} [{{ oParentOptions.notables }}]
</label>
{% endif %}
</div>
Expand Down

0 comments on commit 149db0e

Please sign in to comment.