<commit_before>{include file='header'}

{if $aclObjectTypeID}
	{include file='aclPermissions'}
	
	{if !$category|isset}
		{include file='aclPermissionJavaScript' containerID='groupPermissions' objectTypeID=$aclObjectTypeID}
	{else}
		{include file='aclPermissionJavaScript' containerID='groupPermissions' objectTypeID=$aclObjectTypeID objectID=$category->categoryID}
	{/if}
{/if}

{include file='multipleLanguageInputJavascript' elementIdentifier='title' forceSelection=false}
{if $objectType->getProcessor()->hasDescription()}
	{include file='multipleLanguageInputJavascript' elementIdentifier='description' forceSelection=false}
{/if}

<header class="boxHeadline">
	<hgroup>
		<h1>{@$objectType->getProcessor()->getLanguageVariable($action)}</h1>
	</hgroup>
</header>

{if $errorField}
	<p class="error">{lang}wcf.global.form.error{/lang}</p>
{/if}

{if $success|isset}
	<p class="success">{lang}wcf.global.form.{@$action}.success{/lang}</p>	
{/if}

{hascontent}
	<div class="contentNavigation">
		<nav>
			<ul>
				{content}
					{if $objectType->getProcessor()->canDeleteCategory() || $objectType->getProcessor()->canEditCategory()}
						<li><a href="{link controller=$listController application=$objectType->getProcessor()->getApplication()}{/link}" title="{$objectType->getProcessor()->getLanguageVariable('button.list')}" class="button"><span class="icon icon16 icon-list"></span> <span>{@$objectType->getProcessor()->getLanguageVariable('button.list')}</span></a></li>
					{/if}
					
					{event name='contentNavigationButtons'}
				{/content}
			</ul>
		</nav>
	</div>
{/hascontent}

<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}">
	<div class="container containerPadding marginTop">
		<fieldset>
			<legend>{lang}wcf.global.form.data{/lang}</legend>
			
			{if $objectType->getProcessor()->getMaximumNestingLevel() && $categoryNodeList|count}
				<dl{if $errorField == 'parentCategoryID'} class="formError"{/if}>
					<dt><label for="parentCategoryID">{@$objectType->getProcessor()->getLanguageVariable('parentCategoryID')}</label></dt>
					<dd>
						<select id="parentCategoryID" name="parentCategoryID">
							<option value="0"></option>
							{include file='categoryOptionList' categoryID=$parentCategoryID maximumNestingLevel=$objectType->getProcessor()->getMaximumNestingLevel() - 1}
						</select>
						{if $errorField == 'parentCategoryID'}
							<small class="innerError">
								{assign var=__languageVariable value='parentCategoryID.error.'|concat:$errorType}
								{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
							</small>
						{/if}
						{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('parentCategoryID.description', true)}{/content}</small>{/hascontent}
					</dd>
				</dl>
			{/if}
			
			<dl{if $errorField == 'title'} class="formError"{/if}>
				<dt><label for="title">{@$objectType->getProcessor()->getLanguageVariable('title')}</label></dt>
				<dd>
					<input type="text" id="title" name="title" value="{$i18nPlainValues['title']}" class="long" />
					{if $errorField == 'title'}
						<small class="innerError">
							{if $errorType == 'empty'}
								{lang}wcf.global.form.error.empty{/lang}
							{else}
								{assign var=__languageVariable value='title.error.'|concat:$errorType}
								{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
							{/if}
						</small>
					{/if}
					{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('title.description', true)}{/content}</small>{/hascontent}
				</dd>
			</dl>
			
			{if $objectType->getProcessor()->hasDescription()}
				<dl{if $errorField == 'description'} class="formError"{/if}>
					<dt><label for="description">{@$objectType->getProcessor()->getLanguageVariable('description')}</label></dt>
					<dd>
						<textarea cols="40" rows="10" id="description" name="description">{$i18nPlainValues['description']}</textarea>
						{if $errorField == 'description'}
							<small class="innerError">
								{if $errorType == 'empty'}
									{lang}wcf.global.form.error.empty{/lang}
								{else}
									{assign var=__languageVariable value='description.error.'|concat:$errorType}
									{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
								{/if}
							</small>
						{/if}
						{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('description.description', true)}{/content}</small>{/hascontent}
					</dd>
				</dl>
			{/if}
			
			<dl{if $errorField == 'isDisabled'} class="formError"{/if}>
				<dt class="reversed"><label for="isDisabled">{@$objectType->getProcessor()->getLanguageVariable('isDisabled')}</label></dt>
				<dd>
					<input type="checkbox" id="isDisabled" name="isDisabled"{if $isDisabled} checked="checked"{/if} />
					{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('isDisabled.description', true)}{/content}</small>{/hascontent}
				</dd>
			</dl>
			
			<dl{if $errorField == 'showOrder'} class="formError"{/if}>
				<dt><label for="showOrder">{@$objectType->getProcessor()->getLanguageVariable('showOrder')}</label></dt>
				<dd>
					<input type="number" id="showOrder" name="showOrder" value="{$showOrder}" class="short" />
					{if $errorField == 'showOrder'}
						<small class="innerError">
							{assign var=__languageVariable value='showOrder.error.'|concat:$errorType}
							{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
						</small><commit_msg>Adds min value for categories' showOrder field<commit_after>{include file='header'}

{if $aclObjectTypeID}
	{include file='aclPermissions'}
	
	{if !$category|isset}
		{include file='aclPermissionJavaScript' containerID='groupPermissions' objectTypeID=$aclObjectTypeID}
	{else}
		{include file='aclPermissionJavaScript' containerID='groupPermissions' objectTypeID=$aclObjectTypeID objectID=$category->categoryID}
	{/if}
{/if}

{include file='multipleLanguageInputJavascript' elementIdentifier='title' forceSelection=false}
{if $objectType->getProcessor()->hasDescription()}
	{include file='multipleLanguageInputJavascript' elementIdentifier='description' forceSelection=false}
{/if}

<header class="boxHeadline">
	<hgroup>
		<h1>{@$objectType->getProcessor()->getLanguageVariable($action)}</h1>
	</hgroup>
</header>

{if $errorField}
	<p class="error">{lang}wcf.global.form.error{/lang}</p>
{/if}

{if $success|isset}
	<p class="success">{lang}wcf.global.form.{@$action}.success{/lang}</p>	
{/if}

{hascontent}
	<div class="contentNavigation">
		<nav>
			<ul>
				{content}
					{if $objectType->getProcessor()->canDeleteCategory() || $objectType->getProcessor()->canEditCategory()}
						<li><a href="{link controller=$listController application=$objectType->getProcessor()->getApplication()}{/link}" title="{$objectType->getProcessor()->getLanguageVariable('button.list')}" class="button"><span class="icon icon16 icon-list"></span> <span>{@$objectType->getProcessor()->getLanguageVariable('button.list')}</span></a></li>
					{/if}
					
					{event name='contentNavigationButtons'}
				{/content}
			</ul>
		</nav>
	</div>
{/hascontent}

<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}">
	<div class="container containerPadding marginTop">
		<fieldset>
			<legend>{lang}wcf.global.form.data{/lang}</legend>
			
			{if $objectType->getProcessor()->getMaximumNestingLevel() && $categoryNodeList|count}
				<dl{if $errorField == 'parentCategoryID'} class="formError"{/if}>
					<dt><label for="parentCategoryID">{@$objectType->getProcessor()->getLanguageVariable('parentCategoryID')}</label></dt>
					<dd>
						<select id="parentCategoryID" name="parentCategoryID">
							<option value="0"></option>
							{include file='categoryOptionList' categoryID=$parentCategoryID maximumNestingLevel=$objectType->getProcessor()->getMaximumNestingLevel() - 1}
						</select>
						{if $errorField == 'parentCategoryID'}
							<small class="innerError">
								{assign var=__languageVariable value='parentCategoryID.error.'|concat:$errorType}
								{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
							</small>
						{/if}
						{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('parentCategoryID.description', true)}{/content}</small>{/hascontent}
					</dd>
				</dl>
			{/if}
			
			<dl{if $errorField == 'title'} class="formError"{/if}>
				<dt><label for="title">{@$objectType->getProcessor()->getLanguageVariable('title')}</label></dt>
				<dd>
					<input type="text" id="title" name="title" value="{$i18nPlainValues['title']}" class="long" />
					{if $errorField == 'title'}
						<small class="innerError">
							{if $errorType == 'empty'}
								{lang}wcf.global.form.error.empty{/lang}
							{else}
								{assign var=__languageVariable value='title.error.'|concat:$errorType}
								{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
							{/if}
						</small>
					{/if}
					{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('title.description', true)}{/content}</small>{/hascontent}
				</dd>
			</dl>
			
			{if $objectType->getProcessor()->hasDescription()}
				<dl{if $errorField == 'description'} class="formError"{/if}>
					<dt><label for="description">{@$objectType->getProcessor()->getLanguageVariable('description')}</label></dt>
					<dd>
						<textarea cols="40" rows="10" id="description" name="description">{$i18nPlainValues['description']}</textarea>
						{if $errorField == 'description'}
							<small class="innerError">
								{if $errorType == 'empty'}
									{lang}wcf.global.form.error.empty{/lang}
								{else}
									{assign var=__languageVariable value='description.error.'|concat:$errorType}
									{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
								{/if}
							</small>
						{/if}
						{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('description.description', true)}{/content}</small>{/hascontent}
					</dd>
				</dl>
			{/if}
			
			<dl{if $errorField == 'isDisabled'} class="formError"{/if}>
				<dt class="reversed"><label for="isDisabled">{@$objectType->getProcessor()->getLanguageVariable('isDisabled')}</label></dt>
				<dd>
					<input type="checkbox" id="isDisabled" name="isDisabled"{if $isDisabled} checked="checked"{/if} />
					{hascontent}<small>{content}{@$objectType->getProcessor()->getLanguageVariable('isDisabled.description', true)}{/content}</small>{/hascontent}
				</dd>
			</dl>
			
			<dl{if $errorField == 'showOrder'} class="formError"{/if}>
				<dt><label for="showOrder">{@$objectType->getProcessor()->getLanguageVariable('showOrder')}</label></dt>
				<dd>
					<input type="number" id="showOrder" name="showOrder" value="{$showOrder}" min="0" class="short" />
					{if $errorField == 'showOrder'}
						<small class="innerError">
							{assign var=__languageVariable value='showOrder.error.'|concat:$errorType}
							{@$objectType->getProcessor()->getLanguageVariable($__languageVariable)}
						</small>
{'fraction_non_alphanumeric': 0.1939509489557154, 'fraction_numerical': 0.0025132160499176707, 'mean_word_length': 5.299126637554585, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 289, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3430230', 'n_tokens_mistral': 4257, 'n_tokens_neox': 3472, 'n_words': 482}