Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Fixed issue: settings for questions that should not be possib…
…le to manipulate during survey runtime are changeable" This reverts commit cd0340b.
- Loading branch information
1 parent
5de2e6b
commit 8a25683
Showing
3 changed files
with
18 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
application/extensions/GeneralOptionWidget/views/questiongroup.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
<select | ||
<select | ||
class="form-control" | ||
name="question[<?= $this->generalOption->name ?>]" | ||
id="<?= $this->generalOption->name ?>" | ||
<?= $this->generalOption->disableInActive ? 'disabled' : '' ?> | ||
name="question[<?= $this->generalOption->name; ?>]" | ||
id="<?= $this->generalOption->name; ?>" | ||
> | ||
<!-- TODO: Fix weird object reference. --> | ||
<?php foreach ($this->generalOption->formElement->options['options'] as $option) : ?> | ||
<?php if ($this->generalOption->formElement->value == $option->value) : ?> | ||
<option value="<?= $option->value ?>" selected="selected"><?= $option->text ?></option> | ||
<option value="<?= $option->value; ?>" selected="selected"><?= $option->text; ?></option> | ||
<?php else : ?> | ||
<option value="<?= $option->value ?>"><?= $option->text ?></option> | ||
<option value="<?= $option->value; ?>"><?= $option->text; ?></option> | ||
<?php endif; ?> | ||
<?php endforeach; ?> | ||
</select> |
30 changes: 13 additions & 17 deletions
30
application/extensions/GeneralOptionWidget/views/switch.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,39 @@ | ||
<div class="btn-group col-12" role="group" data-toggle="buttons"> | ||
<?php if ($this->generalOption->formElement->value === 'Y') : ?> | ||
<label class="btn btn-default active <?= $this->generalOption->disableInActive ? 'disabled' : '' ?>"> | ||
<?php if ($this->generalOption->formElement->value == 'Y') : ?> | ||
<label class="btn btn-default active"> | ||
<input | ||
type="radio" | ||
name="question[<?= $this->generalOption->name ?>]" | ||
name="question[<?= $this->generalOption->name; ?>]" | ||
value="Y" | ||
<?= $this->generalOption->disableInActive ? 'disabled' : '' ?> | ||
checked | ||
/> | ||
<?= gT('On') ?> | ||
<?= gT('On'); ?> | ||
</label> | ||
<label class="btn btn-default <?= $this->generalOption->disableInActive ? 'disabled' : '' ?>"> | ||
<label class="btn btn-default"> | ||
<input | ||
type="radio" | ||
name="question[<?= $this->generalOption->name ?>]" | ||
name="question[<?= $this->generalOption->name; ?>]" | ||
value="N" | ||
<?= $this->generalOption->disableInActive ? 'disabled' : '' ?> | ||
/> | ||
<?= gT('Off') ?> | ||
<?= gT('Off'); ?> | ||
</label> | ||
<?php else : ?> | ||
<label class="btn btn-default <?= $this->generalOption->disableInActive ? 'disabled' : '' ?>"> | ||
<label class="btn btn-default"> | ||
<input | ||
type="radio" | ||
name="question[<?= $this->generalOption->name ?>]" | ||
name="question[<?= $this->generalOption->name; ?>]" | ||
value="Y" | ||
<?= $this->generalOption->disableInActive ? 'disabled' : '' ?> | ||
/> | ||
<?= gT('On') ?> | ||
<?= gT('On'); ?> | ||
</label> | ||
<label class="btn btn-default active <?= $this->generalOption->disableInActive ? 'disabled' : '' ?>"> | ||
<label class="btn btn-default active"> | ||
<input | ||
type="radio" | ||
name="question[<?= $this->generalOption->name ?>]" | ||
name="question[<?= $this->generalOption->name; ?>]" | ||
value="N" | ||
<?= $this->generalOption->disableInActive ? 'disabled' : '' ?> | ||
checked | ||
/> | ||
<?= gT('Off') ?> | ||
<?= gT('Off'); ?> | ||
</label> | ||
<?php endif; ?> | ||
</div> |