-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathlabelGroupAdd.tpl
More file actions
148 lines (126 loc) · 5.02 KB
/
Copy pathlabelGroupAdd.tpl
File metadata and controls
148 lines (126 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{include file='header' pageTitle='wcf.acp.label.group.'|concat:$action}
{include file='aclPermissions'}
<script data-relocate="true">
require(["WoltLabSuite/Core/Acp/Component/Label/Availability"], ({ setup }) => {
setup();
});
</script>
{if !$groupID|isset}
{include file='shared_aclPermissionJavaScript' containerID='groupPermissions'}
{else}
{include file='shared_aclPermissionJavaScript' containerID='groupPermissions' objectID=$groupID}
{/if}
{assign var=labelForceSelection value=$forceSelection}
<header class="contentHeader">
<div class="contentHeaderTitle">
<h1 class="contentTitle">{lang}wcf.acp.label.group.{$action}{/lang}</h1>
</div>
<nav class="contentHeaderNavigation">
<ul>
{if $action == 'edit'}
{if !$labelGroup->sortAlphabetically}
<li><button type="button" class="button jsChangeShowOrder">{icon name='up-down'} <span>{lang}wcf.global.changeShowOrder{/lang}</span></button></li>
{/if}
<li>
{unsafe:$interactionContextMenu->render()}
</li>
{/if}
{event name='contentHeaderNavigation'}
</ul>
</nav>
</header>
{include file='shared_formNotice'}
<form method="post" action="{if $action == 'add'}{link controller='LabelGroupAdd'}{/link}{else}{link controller='LabelGroupEdit' object=$labelGroup}{/link}{/if}">
<div class="section tabMenuContainer">
<nav class="tabMenu">
<ul>
<li><a href="#general">{lang}wcf.global.form.data{/lang}</a></li>
<li><a href="#connect">{lang}wcf.acp.label.group.category.connect{/lang}</a></li>
</ul>
</nav>
<div id="general" class="tabMenuContent">
<div class="section">
<dl{if $errorField == 'groupName'} class="formError"{/if}>
<dt><label for="groupName">{lang}wcf.global.title{/lang}</label></dt>
<dd>
<input type="text" id="groupName" name="groupName" value="{$i18nPlainValues['groupName']}" autofocus class="long" maxlength="80">
{if $errorField == 'groupName'}
<small class="innerError">
{if $errorType == 'empty' || $errorType == 'multilingual'}
{lang}wcf.global.form.error.{$errorType}{/lang}
{else}
{lang}wcf.acp.label.group.groupName.error.{$errorType}{/lang}
{/if}
</small>
{/if}
<small>{lang}wcf.acp.label.group.groupName.description{/lang}</small>
{include file='shared_multipleLanguageInputJavascript' elementIdentifier='groupName' forceSelection=false}
</dd>
</dl>
<dl>
<dt><label for="groupDescription">{lang}wcf.global.description{/lang}</label></dt>
<dd>
<input type="text" id="groupDescription" name="groupDescription" class="long" value="{$groupDescription}" maxlength="255">
<small>{lang}wcf.acp.label.group.groupDescription.description{/lang}</small>
</dd>
</dl>
<dl>
<dt><label for="showOrder">{lang}wcf.global.showOrder{/lang}</label></dt>
<dd>
<input type="number" min="0" id="showOrder" name="showOrder" class="tiny" value="{if $showOrder}{$showOrder}{/if}">
</dd>
</dl>
<dl>
<dt></dt>
<dd><label><input type="checkbox" name="forceSelection" id="forceSelection" value="1"{if $labelForceSelection} checked{/if}> {lang}wcf.acp.label.group.forceSelection{/lang}</label></dd>
</dl>
<dl>
<dt></dt>
<dd><label><input type="checkbox" name="sortAlphabetically" id="sortAlphabetically" value="1"{if $sortAlphabetically} checked{/if}> {lang}wcf.acp.label.group.sortAlphabetically{/lang}</label></dd>
</dl>
<dl id="groupPermissions">
<dt>{lang}wcf.acl.permissions{/lang}</dt>
<dd></dd>
</dl>
{event name='dataFields'}
</div>
{event name='generalSections'}
</div>
<div id="connect" class="tabMenuContent">
<div class="section">
{foreach from=$labelObjectTypeContainers item=container}
<dl>
<dt>{$container->getTitle()}</dt>
<dd>
<ul class="structuredList">
{foreach from=$container item=objectType}
<li class="{if $objectType->isCategory()} category{/if}"{if $objectType->getDepth()} style="padding-left: {$objectType->getDepth() * 20}px"{/if} data-depth="{$objectType->getDepth()}">
<span>{$objectType->getLabel()}</span>
<label><input id="checkbox_{$container->objectTypeID}_{$objectType->getObjectID()}" type="checkbox" name="objectTypes[{$container->objectTypeID}][]" value="{$objectType->getObjectID()}"{if $objectType->getOptionValue()} checked{/if}></label>
</li>
{/foreach}
</ul>
</dd>
</dl>
{/foreach}
</div>
{event name='connectSections'}
</div>
</div>
<div class="formSubmit">
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
{csrfToken}
</div>
</form>
{if $action == 'edit' && !$labelGroup->sortAlphabetically}
<script data-relocate="true">
require(["WoltLabSuite/Core/Component/ChangeShowOrder"], ({ setup }) => {
{jsphrase name='wcf.global.changeShowOrder'}
setup(
document.querySelector('.jsChangeShowOrder'),
'core/labels/groups/{$labelGroup->groupID}/labels/show-order'
);
});
</script>
{/if}
{include file='footer'}