Commit | Line | Data |
---|---|---|
4b3d9dab | 1 | {include file='header' pageTitle='wcf.acp.label.group.'|concat:$action} |
3b75466f MW |
2 | |
3 | {include file='aclPermissions'} | |
b50a454e | 4 | <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Label.js?v={@LAST_UPDATE_TIME}"></script> |
9543d9fe | 5 | <script data-relocate="true"> |
3b75466f MW |
6 | //<![CDATA[ |
7 | $(function() { | |
3b75466f MW |
8 | new WCF.Label.ACPList.Connect(); |
9 | ||
10 | WCF.TabMenu.init(); | |
11 | }); | |
12 | //]]> | |
13 | </script> | |
14 | ||
c7e6ce11 MS |
15 | {if !$groupID|isset} |
16 | {include file='aclPermissionJavaScript' containerID='groupPermissions'} | |
17 | {else} | |
18 | {include file='aclPermissionJavaScript' containerID='groupPermissions' objectID=$groupID} | |
19 | {/if} | |
20 | ||
e76c454b AE |
21 | {assign var=labelForceSelection value=$forceSelection} |
22 | ||
95961bdf | 23 | <header class="contentHeader"> |
b5c94e9e AE |
24 | <div class="contentHeaderTitle"> |
25 | <h1 class="contentTitle">{lang}wcf.acp.label.group.{$action}{/lang}</h1> | |
26 | </div> | |
27 | ||
28 | <nav class="contentHeaderNavigation"> | |
29 | <ul> | |
30 | <li><a href="{link controller='LabelGroupList'}{/link}" class="button"><span class="icon icon16 fa-list"></span> <span>{lang}wcf.acp.menu.link.label.group.list{/lang}</span></a></li> | |
31 | ||
32 | {event name='contentHeaderNavigation'} | |
33 | </ul> | |
34 | </nav> | |
3b75466f MW |
35 | </header> |
36 | ||
ee629b22 | 37 | {include file='formError'} |
3b75466f MW |
38 | |
39 | {if $success|isset} | |
40 | <p class="success">{lang}wcf.global.success.{$action}{/lang}</p> | |
41 | {/if} | |
42 | ||
3b75466f | 43 | <form method="post" action="{if $action == 'add'}{link controller='LabelGroupAdd'}{/link}{else}{link controller='LabelGroupEdit' object=$labelGroup}{/link}{/if}"> |
95961bdf | 44 | <div class="section tabMenuContainer"> |
3b75466f MW |
45 | <nav class="tabMenu"> |
46 | <ul> | |
47 | <li><a href="{@$__wcf->getAnchor('general')}">{lang}wcf.global.form.data{/lang}</a></li> | |
48 | <li><a href="{@$__wcf->getAnchor('connect')}">{lang}wcf.acp.label.group.category.connect{/lang}</a></li> | |
49 | </ul> | |
50 | </nav> | |
51 | ||
95961bdf MW |
52 | <div id="general" class="tabMenuContent"> |
53 | <div class="section"> | |
3b75466f | 54 | <dl{if $errorField == 'groupName'} class="formError"{/if}> |
7628a88c | 55 | <dt><label for="groupName">{lang}wcf.global.title{/lang}</label></dt> |
3b75466f | 56 | <dd> |
6f2bc235 | 57 | <input type="text" id="groupName" name="groupName" value="{$i18nPlainValues['groupName']}" autofocus class="long"> |
3b75466f MW |
58 | {if $errorField == 'groupName'} |
59 | <small class="innerError"> | |
29d01d46 MS |
60 | {if $errorType == 'empty' || $errorType == 'multilingual'} |
61 | {lang}wcf.global.form.error.{@$errorType}{/lang} | |
3b75466f MW |
62 | {else} |
63 | {lang}wcf.acp.label.group.groupName.error.{@$errorType}{/lang} | |
64 | {/if} | |
65 | </small> | |
66 | {/if} | |
f3db386c | 67 | <small>{lang}wcf.acp.label.group.groupName.description{/lang}</small> |
e76c454b AE |
68 | {include file='multipleLanguageInputJavascript' elementIdentifier='groupName' forceSelection=false} |
69 | </dd> | |
70 | </dl> | |
71 | ||
f3db386c MW |
72 | <dl> |
73 | <dt><label for="groupDescription">{lang}wcf.global.description{/lang}</label></dt> | |
74 | <dd> | |
e5f9b56c | 75 | <input type="text" id="groupDescription" name="groupDescription" class="long" value="{$groupDescription}" maxlength="255"> |
f3db386c MW |
76 | <small>{lang}wcf.acp.label.group.groupDescription.description{/lang}</small> |
77 | </dd> | |
78 | </dl> | |
79 | ||
e76c454b | 80 | <dl> |
f5ecf730 | 81 | <dt><label for="showOrder">{lang}wcf.global.showOrder{/lang}</label></dt> |
e76c454b | 82 | <dd> |
e5f9b56c | 83 | <input type="number" min="0" id="showOrder" name="showOrder" class="tiny" value="{if $showOrder}{@$showOrder}{/if}"> |
3b75466f MW |
84 | </dd> |
85 | </dl> | |
86 | ||
87 | <dl> | |
e76c454b | 88 | <dt></dt> |
6f2bc235 | 89 | <dd><label><input type="checkbox" name="forceSelection" id="forceSelection" value="1"{if $labelForceSelection} checked{/if}> {lang}wcf.acp.label.group.forceSelection{/lang}</label></dd> |
3b75466f MW |
90 | </dl> |
91 | ||
92 | <dl id="groupPermissions"> | |
93 | <dt>{lang}wcf.acl.permissions{/lang}</dt> | |
94 | <dd></dd> | |
95 | </dl> | |
96 | ||
97 | {event name='dataFields'} | |
95961bdf | 98 | </div> |
3b75466f | 99 | |
95961bdf | 100 | {event name='generalSections'} |
3b75466f MW |
101 | </div> |
102 | ||
95961bdf MW |
103 | <div id="connect" class="tabMenuContent"> |
104 | <div class="section"> | |
3b75466f MW |
105 | {foreach from=$labelObjectTypeContainers item=container} |
106 | {if $container->isBooleanOption()} | |
107 | <!-- TODO: Implement boolean option mode --> | |
108 | {else} | |
109 | <dl> | |
42809c47 | 110 | <dt>{lang}wcf.acp.label.container.{$container->getObjectTypeName()}{/lang}</dt> |
3b75466f | 111 | <dd> |
95961bdf | 112 | <ul class="structuredList"> |
3b75466f MW |
113 | {foreach from=$container item=objectType} |
114 | <li class="{if $objectType->isCategory()} category{/if}"{if $objectType->getDepth()} style="padding-left: {21 * $objectType->getDepth()}px"{/if} data-depth="{@$objectType->getDepth()}"> | |
115 | <span>{$objectType->getLabel()}</span> | |
6f2bc235 | 116 | <label><input id="checkbox_{@$container->getObjectTypeID()}_{@$objectType->getObjectID()}" type="checkbox" name="objectTypes[{@$container->getObjectTypeID()}][]" value="{@$objectType->getObjectID()}"{if $objectType->getOptionValue()} checked{/if}></label> |
3b75466f MW |
117 | </li> |
118 | {/foreach} | |
119 | </ul> | |
120 | </dd> | |
121 | </dl> | |
122 | {/if} | |
123 | {/foreach} | |
95961bdf | 124 | </div> |
3b75466f | 125 | |
95961bdf | 126 | {event name='connectSections'} |
3b75466f MW |
127 | </div> |
128 | </div> | |
129 | ||
130 | <div class="formSubmit"> | |
e5f9b56c | 131 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> |
ee629b22 | 132 | {@SECURITY_TOKEN_INPUT_TAG} |
3b75466f MW |
133 | </div> |
134 | </form> | |
135 | ||
136 | {include file='footer'} |