<input type="radio" id="{$option->optionName}_no"{if $value == 0} 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="red"><span class="icon icon16 fa-times"></span> {lang}wcf.acp.option.type.boolean.no{/lang}</label>
</li>
- {if $option->optionName|mb_strpos:'admin.' !== 0 && ($group === null || !$group->isEveryone())}
+ {if $option->optionName|mb_strpos:'admin.' !== 0 && ($group === null || (!$group->isEveryone() && !$group->isUsers()))}
<li>
<input type="radio" id="{$option->optionName}_never"{if $value == -1} 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="yellow"><span class="icon icon16 fa-ban"></span> {lang}wcf.acp.option.type.boolean.never{/lang}</label>
var fragment = document.createDocumentFragment();
fragment.appendChild(container);
- var dd, groupId, id, inputElements, isBoolean, label, labels = container.getElementsByTagName('label');
+ var dd, groupId, id, inputElement, inputElements, isBoolean, label, labels = container.getElementsByTagName('label');
for (var i = 0, length = labels.length; i < length; i++) {
label = labels[i];
id = label.getAttribute('for') || '';
use wcf\system\exception\PermissionDeniedException;
use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
+use wcf\system\option\user\group\IUserGroupGroupOptionType;
use wcf\system\option\user\group\IUserGroupOptionType;
use wcf\system\WCF;
// create form elements for each group
foreach ($this->groups as $group) {
$optionValue = isset($this->values[$group->groupID]) ? $this->values[$group->groupID] : '';
+ if ($this->optionType instanceof IUserGroupGroupOptionType) {
+ $this->optionType->setUserGroup($group);
+ }
+
$this->formElements[$group->groupID] = $this->optionType->getFormElement($this->userGroupOption, $optionValue);
}
}
return $this->groupType == self::EVERYONE;
}
+ /**
+ * Returns true if this is the 'Users' group.
+ *
+ * @return boolean
+ * @since 3.1
+ */
+ public function isUsers() {
+ return $this->groupType == self::USERS;
+ }
+
/**
* Returns true if the given groups are accessible for the active user.
*