Merge branch '5.2' into 5.3
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / acp / templates / categoryAdd.tpl
1 {include file='header'}
2
3 {if $aclObjectTypeID}
4 {include file='aclPermissions'}
5
6 {if !$category|isset}
7 {include file='aclPermissionJavaScript' containerID='groupPermissions' objectTypeID=$aclObjectTypeID}
8 {else}
9 {include file='aclPermissionJavaScript' containerID='groupPermissions' objectTypeID=$aclObjectTypeID objectID=$category->categoryID}
10 {/if}
11 {/if}
12
13 {include file='multipleLanguageInputJavascript' elementIdentifier='title' forceSelection=false}
14 {if $objectType->getProcessor()->hasDescription()}
15 {include file='multipleLanguageInputJavascript' elementIdentifier='description' forceSelection=false}
16 {/if}
17
18 <header class="contentHeader">
19 <div class="contentHeaderTitle">
20 <h1 class="contentTitle">{@$objectType->getProcessor()->getLanguageVariable($action)}</h1>
21 </div>
22
23 {hascontent}
24 <nav class="contentHeaderNavigation">
25 <ul>
26 {content}
27 {if $action == 'edit' && $availableCategories->hasChildren()}
28 <li class="dropdown">
29 <a class="button dropdownToggle"><span class="icon icon16 fa-sort"></span> <span>{@$objectType->getProcessor()->getLanguageVariable('button.choose')}</span></a>
30 <div class="dropdownMenu">
31 <ul class="scrollableDropdownMenu">
32 {foreach from=$availableCategories item='availableCategory'}
33 <li{if $availableCategory->categoryID == $category->categoryID} class="active"{/if}><a href="{link controller=$editController application=$objectType->getProcessor()->getApplication() object=$availableCategory}{/link}">{section name=i loop=$availableCategories->getDepth()}&nbsp;&nbsp;&nbsp;&nbsp;{/section}{$availableCategory->getTitle()}</a></li>
34 {/foreach}
35 </ul>
36 </div>
37 </li>
38 {/if}
39
40 {if $objectType->getProcessor()->canDeleteCategory() || $objectType->getProcessor()->canEditCategory()}
41 <li><a href="{link controller=$listController application=$objectType->getProcessor()->getApplication()}{/link}" class="button"><span class="icon icon16 fa-list"></span> <span>{@$objectType->getProcessor()->getLanguageVariable('button.list')}</span></a></li>
42 {/if}
43
44 {event name='contentHeaderNavigation'}
45 {/content}
46 </ul>
47 </nav>
48 {/hascontent}
49 </header>
50
51 {include file='formNotice'}
52
53 <form method="post" action="{if $action == 'add'}{link controller=$addController application=$objectType->getProcessor()->getApplication()}{/link}{else}{link controller=$editController application=$objectType->getProcessor()->getApplication() object=$category}{/link}{/if}">
54 {event name='beforeSections'}
55
56 <div class="section">
57 <dl{if $errorField == 'title'} class="formError"{/if}>
58 <dt><label for="title">{@$objectType->getProcessor()->getLanguageVariable('title')}</label></dt>
59 <dd>
60 <input type="text" id="title" name="title" value="{$i18nPlainValues['title']}" class="long">
61 {if $errorField == 'title'}
62 <small class="innerError">
63 {if $errorType == 'empty' || $errorType == 'multilingual'}
64 {lang}wcf.global.form.error.{$errorType}{/lang}
65 {else}
66 {assign var=__languageVariable value='title.error.'|concat:$errorType}
67 {@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
68 {/if}
69 </small>
70 {/if}
71 {hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('title.description', true)}{/content}</small>{/hascontent}
72 </dd>
73 </dl>
74
75 {if $objectType->getProcessor()->hasDescription()}
76 <dl{if $errorField == 'description'} class="formError"{/if}>
77 <dt><label for="description">{@$objectType->getProcessor()->getLanguageVariable('description')}</label></dt>
78 <dd>
79 <textarea cols="40" rows="10" id="description" name="description">{$i18nPlainValues['description']}</textarea>
80 {if $errorField == 'description'}
81 <small class="innerError">
82 {if $errorType == 'empty' || $errorType == 'multilingual'}
83 {lang}wcf.global.form.error.{$errorType}{/lang}
84 {else}
85 {assign var=__languageVariable value='description.error.'|concat:$errorType}
86 {@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
87 {/if}
88 </small>
89 {/if}
90 {hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('description.description', true)}{/content}</small>{/hascontent}
91 </dd>
92 </dl>
93
94 {if $objectType->getProcessor()->supportsHtmlDescription()}
95 <dl>
96 <dt></dt>
97 <dd>
98 <label><input type="checkbox" name="descriptionUseHtml" value="1"{if $descriptionUseHtml} checked{/if}> {@$objectType->getProcessor()->getLanguageVariable('descriptionUseHtml')}</label>
99 </dd>
100 </dl>
101 {/if}
102 {/if}
103
104 <dl{if $errorField == 'isDisabled'} class="formError"{/if}>
105 <dt></dt>
106 <dd>
107 <label><input type="checkbox" id="isDisabled" name="isDisabled"{if $isDisabled} checked{/if}> {@$objectType->getProcessor()->getLanguageVariable('isDisabled')}</label>
108 {hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('isDisabled.description', true)}{/content}</small>{/hascontent}
109 </dd>
110 </dl>
111
112 {event name='dataFields'}
113 </div>
114
115 <section class="section">
116 <h2 class="sectionTitle">{@$objectType->getProcessor()->getLanguageVariable('position')}</h2>
117
118 {if $categoryNodeList->hasChildren() && $objectType->getProcessor()->getMaximumNestingLevel()}
119 <dl{if $errorField == 'parentCategoryID'} class="formError"{/if}>
120 <dt><label for="parentCategoryID">{@$objectType->getProcessor()->getLanguageVariable('parentCategoryID')}</label></dt>
121 <dd>
122 <select id="parentCategoryID" name="parentCategoryID">
123 <option value="0">{lang}wcf.global.noSelection{/lang}</option>
124 {include file='categoryOptionList' categoryID=$parentCategoryID maximumNestingLevel=$objectType->getProcessor()->getMaximumNestingLevel()}
125 </select>
126 {if $errorField == 'parentCategoryID'}
127 <small class="innerError">
128 {assign var=__languageVariable value='parentCategoryID.error.'|concat:$errorType}
129 {@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
130 </small>
131 {/if}
132 {hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('parentCategoryID.description', true)}{/content}</small>{/hascontent}
133 </dd>
134 </dl>
135 {/if}
136
137 <dl{if $errorField == 'showOrder'} class="formError"{/if}>
138 <dt><label for="showOrder">{lang}wcf.global.showOrder{/lang}</label></dt>
139 <dd>
140 <input type="number" id="showOrder" name="showOrder" value="{$showOrder}" min="0" class="short">
141 {if $errorField == 'showOrder'}
142 <small class="innerError">
143 {assign var=__languageVariable value='showOrder.error.'|concat:$errorType}
144 {@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
145 </small>
146 {/if}
147 {hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('showOrder.description', true)}{/content}</small>{/hascontent}
148 </dd>
149 </dl>
150
151 {event name='positionFields'}
152 </section>
153
154 {if $aclObjectTypeID}
155 <section class="section">
156 <h2 class="sectionTitle">{lang}wcf.acl.permissions{/lang}</h2>
157
158 <dl id="groupPermissions" class="wide">
159 <dt>{lang}wcf.acl.permissions{/lang}</dt>
160 <dd></dd>
161 </dl>
162
163 {event name='permissionFields'}
164 </section>
165 {/if}
166
167 {event name='afterSections'}
168
169 <div class="formSubmit">
170 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
171 {@SECURITY_TOKEN_INPUT_TAG}
172 </div>
173 </form>
174
175 {include file='footer'}