Fix checking current value of radio button form fields
authorMatthias Schmidt <gravatronics@live.com>
Sat, 27 Jun 2020 05:51:02 +0000 (07:51 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 27 Jun 2020 05:51:02 +0000 (07:51 +0200)
com.woltlab.wcf/templates/__radioButtonFormField.tpl
wcfsetup/install/files/acp/templates/__radioButtonFormField.tpl

index 6080d1d43d0f31719e1c08512022483f2b3bb436..8ca9eef8a6ff292e46dd9609110f8d90e2247836 100644 (file)
@@ -4,7 +4,7 @@
                        *}type="radio" {*
                        *}name="{@$field->getPrefixedId()}" {*
                        *}value="{$__fieldValue}"{*
-                       *}{if $field->getValue() === $__fieldValue} checked{/if}{*
+                       *}{if $field->getValue() !== null && $field->getValue() == $__fieldValue} checked{/if}{*
                        *}{if $field->isImmutable()} disabled{/if}{*
                *}> {@$__fieldLabel}
        </label>
index 6080d1d43d0f31719e1c08512022483f2b3bb436..8ca9eef8a6ff292e46dd9609110f8d90e2247836 100644 (file)
@@ -4,7 +4,7 @@
                        *}type="radio" {*
                        *}name="{@$field->getPrefixedId()}" {*
                        *}value="{$__fieldValue}"{*
-                       *}{if $field->getValue() === $__fieldValue} checked{/if}{*
+                       *}{if $field->getValue() !== null && $field->getValue() == $__fieldValue} checked{/if}{*
                        *}{if $field->isImmutable()} disabled{/if}{*
                *}> {@$__fieldLabel}
        </label>