--- /dev/null
+<dl id="{@$field->getPrefixedId()}Container" {if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$field->checkDependencies()} style="display: none;"{/if}>
+ <dt></dt>
+ <dd>
+ <label>
+ <input type="checkbox" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="1"{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}{if $field->getValue()} checked{/if}>
+ {@$field->getLabel()}{if $field->isRequired()} <span class="formFieldRequired">*</span>{/if}
+ </label>
+
+ {include file='__formFieldDescription'}
+ {include file='__formFieldErrors'}
+ {include file='__formFieldDependencies'}
+ {include file='__formFieldDataHandler'}
+ </dd>
+</dl>
"templates": [
"__aclFormField",
"__booleanFormField",
+ "__checkboxFormField",
"__contentLanguageFormField",
"__dateFormField",
"__emailFormField",
--- /dev/null
+<dl id="{@$field->getPrefixedId()}Container" {if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$field->checkDependencies()} style="display: none;"{/if}>
+ <dt></dt>
+ <dd>
+ <label>
+ <input type="checkbox" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="1"{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}{if $field->getValue()} checked{/if}>
+ {@$field->getLabel()}{if $field->isRequired()} <span class="formFieldRequired">*</span>{/if}
+ </label>
+
+ {include file='__formFieldDescription'}
+ {include file='__formFieldErrors'}
+ {include file='__formFieldDependencies'}
+ {include file='__formFieldDataHandler'}
+ </dd>
+</dl>
--- /dev/null
+<?php
+namespace wcf\system\form\builder\field;
+use wcf\system\WCF;
+
+/**
+ * Implementation of a checkbox form field for boolen values.
+ *
+ * @author Peter Lohse
+ * @copyright 2001-2020 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Form\Builder\Field
+ * @since 5.3
+ */
+class CheckboxFormField extends BooleanFormField {
+ /**
+ * @inheritDoc
+ */
+ protected $templateName = '__checkboxFormField';
+
+ /**
+ * @inheritDoc
+ */
+ public function getHtml() {
+ return WCF::getTPL()->fetch(
+ $this->templateName,
+ 'wcf',
+ [
+ 'field' => $this,
+ ]
+ );
+ }
+}