Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
fix(Form): do not use strict check option for select type
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine Karnaukhov committed Oct 24, 2018
1 parent f6960d5 commit 4504833
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Options/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function write() {
<? foreach ($opt['values'] as $value => $display) { ?>
<option
value="<?=$value?>"
<?=Option::get(ADMIN_MODULE_NAME, $opt_name, $opt['default']) === $value ? 'selected="selected"' : ''?>
<?=Option::get(ADMIN_MODULE_NAME, $opt_name, $opt['default']) == $value ? 'selected="selected"' : ''?>
><?=$display?></option>
<? } ?>
</select>
Expand Down Expand Up @@ -173,7 +173,7 @@ public function write() {
id="<?=$opt_name?>"
<?= $opt['required'] ? 'required="required"' : ''?>
<?= $opt['placeholder'] ? 'placeholder="' . htmlspecialchars($opt['placeholder']) . '"' : ''?>
><?=htmlspecialchars(Option::get(ADMIN_MODULE_NAME, $opt_name) ?: $opt['default']);?></textarea>
><?=htmlspecialchars(Option::get(ADMIN_MODULE_NAME, $opt_name, $opt['default']));?></textarea>
<?
break;

Expand Down

0 comments on commit 4504833

Please sign in to comment.