-<input type="checkbox" id="{$option->optionName}" {if $value} checked="checked"{/if} name="values[{$option->optionName}]" value="1" {if $disableOptions || $enableOptions}class="jsEnablesOptions" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]" {/if} />
+<ol class="optionTypeBoolean">
+ <li>
+ <input type="radio" id="{$option->optionName}_yes"{if $value == 1} checked="checked"{/if} name="values[{$option->optionName}]" value="1"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
+ <label for="{$option->optionName}_yes" class="yes"><span class="icon icon16 fa-check"></span> {lang}wcf.acp.option.type.boolean.yes{/lang}</label>
+ </li>
+ <li>
+ <input type="radio" id="{$option->optionName}_no"{if $value == 0} checked="checked"{/if} name="values[{$option->optionName}]" value="0"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
+ <label for="{$option->optionName}_no" class="no"><span class="icon icon16 fa-times"></span> {lang}wcf.acp.option.type.boolean.no{/lang}</label>
+ </li>
+</ol>
<ol class="optionTypeBoolean">
<li>
<input type="radio" id="{$option->optionName}_yes"{if $value == 1} checked="checked"{/if} name="values[{$option->optionName}]" value="1"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
- <label for="{$option->optionName}_yes" class="yes"><span class="icon icon16 fa-check"></span> {lang}wcf.acp.group.option.type.boolean.yes{/lang}</label>
+ <label for="{$option->optionName}_yes" class="yes"><span class="icon icon16 fa-check"></span> {lang}wcf.acp.option.type.boolean.yes{/lang}</label>
</li>
<li>
<input type="radio" id="{$option->optionName}_no"{if $value == 0} checked="checked"{/if} name="values[{$option->optionName}]" value="0"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
- <label for="{$option->optionName}_no" class="no"><span class="icon icon16 fa-times"></span> {lang}wcf.acp.group.option.type.boolean.no{/lang}</label>
+ <label for="{$option->optionName}_no" class="no"><span class="icon icon16 fa-times"></span> {lang}wcf.acp.option.type.boolean.no{/lang}</label>
</li>
{if $group === null || !$group->isEveryone()}
<li>
<input type="radio" id="{$option->optionName}_never"{if $value == -1} checked="checked"{/if} name="values[{$option->optionName}]" value="-1"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
- <label for="{$option->optionName}_never" class="never"><span class="icon icon16 fa-ban"></span> {lang}wcf.acp.group.option.type.boolean.never{/lang}</label>
+ <label for="{$option->optionName}_never" class="never"><span class="icon icon16 fa-ban"></span> {lang}wcf.acp.option.type.boolean.never{/lang}</label>
</li>
{/if}
</ol>
* @see \wcf\system\option\IOptionType::getData()
*/
public function getData(Option $option, $newValue) {
- if ($newValue !== null) return 1;
+ if ($newValue == 1) return 1;
return 0;
}
- /**
- * @see \wcf\system\option\IOptionType::getCSSClassName()
- */
- public function getCSSClassName() {
- return 'reversed';
- }
-
/**
* @see \wcf\system\option\ISearchableUserOption::getSearchFormElement()
*/
* @see \wcf\system\option\IOptionType::getData()
*/
public function getData(Option $option, $newValue) {
- if ($newValue == -1 || $newValue == 1) return $newValue;
- return 0;
- }
-
- /**
- * @see \wcf\system\option\IOptionType::getCSSClassName()
- */
- public function getCSSClassName() {
- return '';
+ return ($newValue == -1) ? -1 : parent::getData($option, $newValue);
}
/**
<item name="wcf.acp.group.copy.copyUserGroupOptions.description"><![CDATA[Die neue Benutzergruppe wird die gleichen Berechtigungen besitzen wie die kopierte Benutzergruppe.]]></item>
<item name="wcf.acp.group.option.admin.paidSubscription.canManageSubscription"><![CDATA[Kann bezahlte Mitgliedschaften verwalten]]></item>
<item name="wcf.acp.group.option.user.tag.canViewTag"><![CDATA[Kann Tag sehen]]></item>
- <item name="wcf.acp.group.option.type.boolean.never"><![CDATA[Nie]]></item>
- <item name="wcf.acp.group.option.type.boolean.no"><![CDATA[Nein]]></item>
- <item name="wcf.acp.group.option.type.boolean.yes"><![CDATA[Ja]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.option.suffix.pixel"><![CDATA[Pixel]]></item>
<item name="wcf.acp.option.suffix.seconds"><![CDATA[Sekunden]]></item>
<item name="wcf.acp.option.suffix.years"><![CDATA[Jahre]]></item>
+ <item name="wcf.acp.option.type.boolean.never"><![CDATA[Nie]]></item>
+ <item name="wcf.acp.option.type.boolean.no"><![CDATA[Nein]]></item>
+ <item name="wcf.acp.option.type.boolean.yes"><![CDATA[Ja]]></item>
</category>
<category name="wcf.acp.package">
<item name="wcf.acp.group.copy.copyUserGroupOptions.description"><![CDATA[The new user group will have the same permissions as the copied user group.]]></item>
<item name="wcf.acp.group.option.admin.paidSubscription.canManageSubscription"><![CDATA[Can manage paid subscriptions]]></item>
<item name="wcf.acp.group.option.user.tag.canViewTag"><![CDATA[Can view tags]]></item>
- <item name="wcf.acp.group.option.type.boolean.never"><![CDATA[Never]]></item>
- <item name="wcf.acp.group.option.type.boolean.no"><![CDATA[No]]></item>
- <item name="wcf.acp.group.option.type.boolean.yes"><![CDATA[Yes]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.option.suffix.pixel"><![CDATA[Pixel]]></item>
<item name="wcf.acp.option.suffix.seconds"><![CDATA[Seconds]]></item>
<item name="wcf.acp.option.suffix.years"><![CDATA[Years]]></item>
+ <item name="wcf.acp.option.type.boolean.never"><![CDATA[Never]]></item>
+ <item name="wcf.acp.option.type.boolean.no"><![CDATA[No]]></item>
+ <item name="wcf.acp.option.type.boolean.yes"><![CDATA[Yes]]></item>
</category>
<category name="wcf.acp.package">