<h1>Dodaj Kategorie</h1>	
<script language="javascript" type="text/javascript">
	urlStatic = '{$urlStatic}';
</script>

<form method="post" action="{url ProductCategory='Edit' id=$objCategoryProduct->GetId() }" enctype="multipart/form-data">
	{if isset($objCategoryProduct)}
		<input type="hidden" name="idProductCategory" value="{$objCategoryProduct->GetId()}" />
	{/if}

	<div class="panelRightTop"></div>
	<div class="panelRightBody">
		<div class="paddedContent">
			{assign var="additionalTitle" value=""}

			{dropDownContainer title="Ogólne" additionalTitle=$additionalTitle}
				<table width="100%" cellspacing="0" cellpadding="5" border="0" class="commonTable">
					<tbody>
						<tr>
							<td>Nazwa:</td>
							<td>							
							{formField name='name' class='inputWidth141 input100percent' errorClass='validate' type='text' obj='objCategoryProduct' func='getName'}
							{if isset($error.name)}<div style="color: red;" id="actionError" class="validate">{$error.name}</div>{/if}
							</td>
						</tr>
						<tr>
							<td>Kategoria główna:</td>
							<td>
								<select name="idParent">
									<option value="0" {if $objCategoryProduct->GetIdParent() == '0'}selected{/if}>
										Rodzic										
									</option>
									{foreach from=$arrayObjProductCategory item=objProductCategoryList} 
									<option value="{$objProductCategoryList->GetId()}" {if $objCategoryProduct->GetIdParent() == $objProductCategoryList->GetId()}selected{/if}>
										{$objProductCategoryList->GetName()}								
									</option>
									{/foreach}
								</select>						
							</td>
						</tr>
						<tr>
							<td>Publikuj:</td>
							<td>{formField type='checkbox' name='publication' obj='objCategoryProduct' func='GetPublication'}</td>
						</tr>
						<tr>
							<td>Kolejność:</td>
							<td>							
							{formField name='weight' class='inputWidth141 input100percent' errorClass='validate' type='text' obj='objCategoryProduct' func='getWeight'}
							{if isset($error.name)}<div style="color: red;" id="actionError" class="validate">{$error.weight}</div>{/if}
							</td>
						</tr>
						{*<tr>
					    <td class="noborder"><b>Data publikacji:</b></td>
					    <td class="noborder">
						<img src='{$urlStatic}/image/iconKalendarz.gif' alt='kalendarz' onclick="showKal(document.getElementById('datepub'));" />&nbsp;{formField type='input' name='datepublication'  errorClass='validate' obj='objCategoryProduct' func='GetDatePublicationWithoutTime' id='datepub'}
						{if isset($error.datepublication)}<div style="color: red;" id="actionError" class="validate">{$error.datepublication}</div>{/if}
						 </td>
					</tr>*}
					</tbody>
				</table>
			{/dropDownContainer}
		
		
		</div>
		</div>
	<div class="cb"></div>
		<div class="panelButtons">
		{if isset($idStructure)}
			<input type="button" value="Anuluj" class="cancel" onclick="document.location.href='{url label=editStructure id=$idStructure}'" />
			{else}
			<input type="button" value="Anuluj" class="cancel" onclick="document.location.href='{url ProductCategory=Index}'"/>
			{/if}
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="submit" value="Zapisz" name="doCategoryEdit"/>
		</div>
	<input type="hidden" name="descriptionHidden" id="descriptionHidden" value="" />
<input type="hidden" name="shortnoteHidden" id="shortnoteHidden" value="" />
</form>
