File tree Expand file tree Collapse file tree
com.woltlab.wcf/templates
wcfsetup/install/files/lib/system/form/builder/field Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ { if ! $field -> isRequired ()}
2+ <label >
3+ <input { *
4+ *} type =" radio" { *
5+ *} name =" { $field -> getPrefixedId ()} " { *
6+ *} value =" " { *
7+ *} { if ! $field -> getFieldClasses ()|empty} class =" { implode from= $field -> getFieldClasses () item= ' class' glue= ' ' } { $class } { /implode} " { /if } { *
8+ *} { if $field -> getValue () !== null && $field -> getValue () == ' ' } checked{ /if}{*
9+ *}{if $field- >isImmutable()} disabled{ /if } { *
10+ *} { foreach from= $field -> getFieldAttributes () key= ' attributeName' item= ' attributeValue' } { $attributeName } ="{ $attributeValue } "{ /foreach } { *
11+ *} > { lang} wcf.global.noSelection{ /lang}
12+ </label >
13+ { /if }
114{ foreach from= $field -> getOptions () key= $__fieldValue item= __fieldLabel}
215 <label >
316 <input { *
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function supportsNestedOptions()
6262 */
6363 public function validate ()
6464 {
65- if (!isset ($ this ->getOptions ()[$ this ->getValue ()])) {
65+ if ($ this -> isRequired () && !isset ($ this ->getOptions ()[$ this ->getValue ()])) {
6666 $ this ->addValidationError (new FormFieldValidationError (
6767 'invalidValue ' ,
6868 'wcf.global.form.error.noValidSelection '
You can’t perform that action at this time.
0 commit comments