From 53f92bba9be098a94d796acc4d6986bed91bc8a8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 27 Jun 2020 07:51:02 +0200 Subject: [PATCH] Fix checking current value of radio button form fields --- com.woltlab.wcf/templates/__radioButtonFormField.tpl | 2 +- wcfsetup/install/files/acp/templates/__radioButtonFormField.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/templates/__radioButtonFormField.tpl b/com.woltlab.wcf/templates/__radioButtonFormField.tpl index 6080d1d43d..8ca9eef8a6 100644 --- a/com.woltlab.wcf/templates/__radioButtonFormField.tpl +++ b/com.woltlab.wcf/templates/__radioButtonFormField.tpl @@ -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} diff --git a/wcfsetup/install/files/acp/templates/__radioButtonFormField.tpl b/wcfsetup/install/files/acp/templates/__radioButtonFormField.tpl index 6080d1d43d..8ca9eef8a6 100644 --- a/wcfsetup/install/files/acp/templates/__radioButtonFormField.tpl +++ b/wcfsetup/install/files/acp/templates/__radioButtonFormField.tpl @@ -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} -- 2.20.1