{if !$__aclSimplePrefix|isset}{assign var='__aclSimplePrefix' value=''}{/if}
+{if !$__aclInputName|isset}{assign var='__aclInputName' value='aclValues'}{/if}
<div class="section">
<dl>
<dd>
<ol class="flexibleButtonGroup">
<li>
- <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll" name="aclValues[allowAll]" value="1"{if $aclValues[allowAll]} checked{/if}>
+ <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll" name="{@$__aclInputName}[allowAll]" value="1"{if $aclValues[allowAll]} checked{/if}>
<label for="{@$__aclSimplePrefix}aclAllowAll" class="green"><span class="icon icon16 fa-check"></span> {lang}wcf.acp.option.type.boolean.yes{/lang}</label>
</li>
<li>
- <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll_no" name="aclValues[allowAll]" value="0"{if !$aclValues[allowAll]} checked{/if}>
+ <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll_no" name="{@$__aclInputName}[allowAll]" value="0"{if !$aclValues[allowAll]} checked{/if}>
<label for="{@$__aclSimplePrefix}aclAllowAll_no" class="red"><span class="icon icon16 fa-times"></span> {lang}wcf.acp.option.type.boolean.no{/lang}</label>
</li>
</ol>
<span class="icon icon16 fa-users"></span>
<span class="aclLabel">{$aclGroup}</span>
<span class="icon icon16 fa-times pointer jsTooltip" title="{lang}wcf.global.button.delete{/lang}"></span>
- <input type="hidden" name="aclValues[group][]" value="{@$aclGroup->groupID}">
+ <input type="hidden" name="{@$__aclInputName}[group][]" value="{@$aclGroup->groupID}">
</li>
{/foreach}
{foreach from=$aclValues[user] item=aclUser}
<span class="icon icon16 fa-user"></span>
<span class="aclLabel">{$aclUser}</span>
<span class="icon icon16 fa-times pointer jsTooltip" title="{lang}wcf.global.button.delete{/lang}"></span>
- <input type="hidden" name="aclValues[user][]" value="{@$aclUser->userID}">
+ <input type="hidden" name="{@$__aclInputName}[user][]" value="{@$aclUser->userID}">
</li>
{/foreach}
</ul>
<script data-relocate="true">
require(['WoltLabSuite/Core/Ui/Acl/Simple'], function(UiAclSimple) {
- new UiAclSimple('{@$__aclSimplePrefix}');
+ new UiAclSimple('{@$__aclSimplePrefix}', '{@$__aclInputName}');
});
</script>
{if !$__aclSimplePrefix|isset}{assign var='__aclSimplePrefix' value=''}{/if}
+{if !$__aclInputName|isset}{assign var='__aclInputName' value='aclValues'}{/if}
<div class="section">
<dl>
<dd>
<ol class="flexibleButtonGroup">
<li>
- <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll" name="aclValues[allowAll]" value="1"{if $aclValues[allowAll]} checked{/if}>
+ <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll" name="{@$__aclInputName}[allowAll]" value="1"{if $aclValues[allowAll]} checked{/if}>
<label for="{@$__aclSimplePrefix}aclAllowAll" class="green"><span class="icon icon16 fa-check"></span> {lang}wcf.acp.option.type.boolean.yes{/lang}</label>
</li>
<li>
- <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll_no" name="aclValues[allowAll]" value="0"{if !$aclValues[allowAll]} checked{/if}>
+ <input type="radio" id="{@$__aclSimplePrefix}aclAllowAll_no" name="{@$__aclInputName}[allowAll]" value="0"{if !$aclValues[allowAll]} checked{/if}>
<label for="{@$__aclSimplePrefix}aclAllowAll_no" class="red"><span class="icon icon16 fa-times"></span> {lang}wcf.acp.option.type.boolean.no{/lang}</label>
</li>
</ol>
<span class="icon icon16 fa-users"></span>
<span class="aclLabel">{$aclGroup}</span>
<span class="icon icon16 fa-times pointer jsTooltip" title="{lang}wcf.global.button.delete{/lang}"></span>
- <input type="hidden" name="aclValues[group][]" value="{@$aclGroup->groupID}">
+ <input type="hidden" name="{@$__aclInputName}[group][]" value="{@$aclGroup->groupID}">
</li>
{/foreach}
{foreach from=$aclValues[user] item=aclUser}
<span class="icon icon16 fa-user"></span>
<span class="aclLabel">{$aclUser}</span>
<span class="icon icon16 fa-times pointer jsTooltip" title="{lang}wcf.global.button.delete{/lang}"></span>
- <input type="hidden" name="aclValues[user][]" value="{@$aclUser->userID}">
+ <input type="hidden" name="{@$__aclInputName}[user][]" value="{@$aclUser->userID}">
</li>
{/foreach}
</ul>
<script data-relocate="true">
require(['WoltLabSuite/Core/Ui/Acl/Simple'], function(UiAclSimple) {
- new UiAclSimple('{@$__aclSimplePrefix}');
+ new UiAclSimple('{@$__aclSimplePrefix}', '{@$__aclInputName}');
});
</script>
user: []
};
- var aclGroups = elBySelAll('input[name="aclValues[group][]"]', content);
+ var aclGroups = elBySelAll('input[name="mediaEditor_' + this._media.mediaID + 'aclValues[group][]"]', content);
for (var i = 0, length = aclGroups.length; i < length; i++) {
aclValues.group.push(~~aclGroups[i].value);
}
- var aclUsers = elBySelAll('input[name="aclValues[user][]"]', content);
+ var aclUsers = elBySelAll('input[name="mediaEditor_' + this._media.mediaID + 'aclValues[user][]"]', content);
for (var i = 0, length = aclUsers.length; i < length; i++) {
aclValues.user.push(~~aclUsers[i].value);
}
return Fake;
}
- function UiAclSimple(prefix) { this.init(prefix); }
+ function UiAclSimple(prefix, inputName) { this.init(prefix, inputName); }
UiAclSimple.prototype = {
- init: function(prefix) {
+ init: function(prefix, inputName) {
this._prefix = prefix || '';
+ this._inputName = inputName || 'aclValues';
this._build();
},
var html = '<span class="icon icon16 fa-' + (type === 'group' ? 'users' : 'user') + '"></span>';
html += '<span class="aclLabel">' + StringUtil.escapeHTML(label) + '</span>';
html += '<span class="icon icon16 fa-times pointer jsTooltip" title="' + Language.get('wcf.global.button.delete') + '"></span>';
- html += '<input type="hidden" name="aclValues[' + type + '][]" value="' + elData(listItem, 'object-id') + '">';
+ html += '<input type="hidden" name="' + this._inputName + '[' + type + '][]" value="' + elData(listItem, 'object-id') + '">';
var item = elCreate('li');
item.innerHTML = html;
'mediaData' => $this->getI18nMediaData($mediaList)[$this->getSingleObject()->mediaID],
'template' => WCF::getTPL()->fetch('mediaEditor', 'wcf', [
'__aclSimplePrefix' => 'mediaEditor_' . $media->mediaID . '_',
+ '__aclInputName' => 'mediaEditor_' . $media->mediaID . '_aclValues',
'__languageChooserPrefix' => 'mediaEditor_' . $media->mediaID . '_',
'aclValues' => SimpleAclHandler::getInstance()->getValues('com.woltlab.wcf.media', $media->mediaID),
'availableLanguages' => LanguageFactory::getInstance()->getLanguages(),