Skip to content

Commit

Permalink
Fixed issue #17233: Inheritance broken for some survey properties whe…
Browse files Browse the repository at this point in the history
…n using Postgres SQL
  • Loading branch information
c-schmitz committed Apr 14, 2021
1 parent bea35ee commit bd0b4c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/models/SurveysGroupsettings.php
Expand Up @@ -349,7 +349,7 @@ public static function getInstance($iSurveyGroupId = 0, $oSurvey = null, $instan
// set instance options only if option needs to be inherited
if ($oSurvey !== null || ($oSurvey === null && $iStep > 1)) {
foreach ($instance->optionAttributes as $key => $attribute) {
if ((empty($instance->oOptions->{$attribute})) || (!empty($instance->oOptions->{$attribute}) && ($instance->oOptions->{$attribute} === 'inherit' || $instance->oOptions->{$attribute} === 'I' || $instance->oOptions->{$attribute} === '-1'))) {
if ((empty($instance->oOptions->{$attribute})) || (!empty($instance->oOptions->{$attribute}) && ($instance->oOptions->{$attribute} === 'inherit' || $instance->oOptions->{$attribute} === 'I' || $instance->oOptions->{$attribute} == '-1'))) {
$instance->oOptions->{$attribute} = $model->$attribute;
$instance->oOptionLabels->{$attribute} = self::translateOptionLabels($instance, $attribute, $model->$attribute);
}
Expand Down
Expand Up @@ -42,14 +42,14 @@
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 content-right">
<label class=" control-label" for='navigationdelay'><?php eT("Navigation delay (seconds):"); ?></label>
<input class="form-control inherit-edit <?php echo ($bShowInherited && $navigationdelay === '-1' ? 'hide' : 'show'); ?>" type='text' size='50' id='navigationdelay' name='navigationdelay' value="<?php echo htmlspecialchars($navigationdelay); ?>" data-inherit-value="-1" data-saved-value="<?php echo $navigationdelay; ?>"/>
<input class="form-control inherit-readonly <?php echo ($bShowInherited && $navigationdelay === '-1' ? 'show' : 'hide'); ?>" type='text' size='50' value="<?php echo htmlspecialchars($oSurveyOptions->navigationdelay); ?>" readonly />
<input class="form-control inherit-edit <?php echo ($bShowInherited && $navigationdelay == '-1' ? 'hide' : 'show'); ?>" type='text' size='50' id='navigationdelay' name='navigationdelay' value="<?php echo htmlspecialchars($navigationdelay); ?>" data-inherit-value="-1" data-saved-value="<?php echo $navigationdelay; ?>"/>
<input class="form-control inherit-readonly <?php echo ($bShowInherited && $navigationdelay == '-1' ? 'show' : 'hide'); ?>" type='text' size='50' value="<?php echo htmlspecialchars($oSurveyOptions->navigationdelay); ?>" readonly />
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 content-right <?php echo ($bShowInherited ? 'show' : 'hide'); ?>">
<label class=" control-label content-center col-sm-12" for='navigationdelay'><?php eT("Inherit:"); ?></label>
<?php $this->widget('yiiwheels.widgets.buttongroup.WhButtonGroup', array(
'name' => 'navigationdelaybutton',
'value'=> ($bShowInherited && $navigationdelay === '-1' ? 'Y' : 'N'),
'value'=> ($bShowInherited && $navigationdelay == '-1' ? 'Y' : 'N'),
'selectOptions'=>$optionsOnOff,
'htmlOptions' => array(
'class' => 'text-option-inherit'
Expand Down
Expand Up @@ -42,14 +42,14 @@ function alertPrivacy()
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 content-right">
<label class=" control-label" for='tokenlength'><?php eT("Set access code length to:"); ?></label>
<input class="form-control inherit-edit <?php echo ($bShowInherited && $tokenlength === '-1' ? 'hide' : 'show'); ?>" type='text' size='50' id='tokenlength' name='tokenlength' value="<?php echo htmlspecialchars($tokenlength); ?>" data-inherit-value="-1" data-saved-value="<?php echo $tokenlength; ?>"/>
<input class="form-control inherit-readonly <?php echo ($bShowInherited && $tokenlength === '-1' ? 'show' : 'hide'); ?>" type='text' size='50' value="<?php echo htmlspecialchars($oSurveyOptions->tokenlength); ?>" readonly />
<input class="form-control inherit-edit <?php echo ($bShowInherited && $tokenlength == '-1' ? 'hide' : 'show'); ?>" type='text' size='50' id='tokenlength' name='tokenlength' value="<?php echo htmlspecialchars($tokenlength); ?>" data-inherit-value="-1" data-saved-value="<?php echo $tokenlength; ?>"/>
<input class="form-control inherit-readonly <?php echo ($bShowInherited && $tokenlength == '-1' ? 'show' : 'hide'); ?>" type='text' size='50' value="<?php echo htmlspecialchars($oSurveyOptions->tokenlength); ?>" readonly />
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 content-right <?php echo ($bShowInherited ? 'show' : 'hide'); ?>">
<label class=" control-label content-center col-sm-12" for='tokenlength'><?php eT("Inherit:"); ?></label>
<?php $this->widget('yiiwheels.widgets.buttongroup.WhButtonGroup', array(
'name' => 'tokenlengthbutton',
'value'=> ($bShowInherited && $tokenlength === '-1' ? 'Y' : 'N'),
'value'=> ($bShowInherited && $tokenlength == '-1' ? 'Y' : 'N'),
'selectOptions'=>$optionsOnOff,
'htmlOptions' => array(
'class' => 'text-option-inherit'
Expand Down

0 comments on commit bd0b4c1

Please sign in to comment.