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