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

<form method="post" action="{url SimpleArticle_Index='Edit' idArticle=$objArticle->GetId()}" id="sendForm"  enctype="multipart/form-data">
	{if isset($objArticle)}
		<input type="hidden" name="idArticle" value="{$objArticle->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>Tytuł:</td>
							<td>							
							{formField name='tytul' class='inputWidth141 input100percent' errorClass='validate' type='text' obj='objArticle' func='GetTitleInput'}
							{if isset($error.tytul)}<div style="color: red;" id="actionError" class="validate">{$error.tytul}</div>{/if}
							</td>
						</tr>
						<tr>
							<td>Publikuj:</td>
							<td>{formField type='checkbox' name='publication' obj='objArticle' func='GetPublication'}</td>
						</tr>
						{*
						<tr>
					    <td class="verticalAlignTop"><b>Data wyświetlana:</b></td>
					    <td><img src='{$urlStatic}/image/iconKalendarz.gif' alt='kalendarz' onclick="showKal(document.getElementById('dateshown'));" />&nbsp;{formField type='input' name='dateshown'  errorClass='validate' obj='objArticle' func='GetDateShown' id='dateshown'}</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='objArticle' func='GetDatePublicationWithoutTime' id='datepub'}
							{if isset($error.datepublication)}<div style="color: red;" id="actionError"  class="validate">{$error.datepublication}</div>{/if}

						</td>
					</tr>
					<tr>
					    <td><b>Godzina:</b></td>
					    <td>
						    {formField type='input' maxlength='2' errorClass='validate' name='timepublication' obj='objArticle' func='GetDatePublicationTime'}
						    <span class="grayText smallText">format (HH)</span>
					    </td>
					</tr>
					{*<tr>
					    <td class="verticalAlignTop noborder">
						<b>Data aktualizacji:</b>
					    </td>
					    <td class="noborder">
						<img src='{$urlStatic}/image/iconKalendarz.gif' alt='kalendarz' onclick="showKal(document.getElementById('dateupdate'));" />&nbsp;{formField type='input' name='dateupdate' obj='objArticle' func='GetDateUpdateWithoutTime' id='dateupdate'}
					    </td>
					</tr>
					<tr>
					    <td><b>Godzina: {$objArticle->GetDatePublicationTime()}</b></td>
					    <td>
						{formField type='input' class='inputWidth141' maxlength='5' name='timeupdate' obj='objArticle' func='GetDatePublicationTime'}
						 <span class="grayText smallText">format (HH:mm)</span>
					    </td>
					</tr>*}
					</tbody>
				</table>
			{/dropDownContainer}

			{*dropDownContainer title="Właściwości (SEO)" isClose=true}
				<table width="100%" cellspacing="0" cellpadding="5" border="0" class="commonTable">
					<tbody>
						<tr>
							<td>Tytuł w menu:</td>
							<td>{formField type='text' name='tytulWMenu' obj='objArticle' func='GetMenuTitle'}</td>
						</tr>
						<tr>
							<td>Folder URL:</td>
							<td>{formField type='text' name='folderUrl' obj='objArticle' func='GetFolderUrl'}</td>
						</tr>
						<tr>
							<td>META Description:</td>
							<td>{formField type='text' name='metaDescription' obj='objArticle' func='GetMetaDescription'}</td>
						</tr>
						<tr>
							<td>META Keywords:</td>
							<td>{formField type='text' name='metaKeywords' obj='objArticle' func='GetMetaKeywords'}</td>
						</tr>
						<tr>
							<td>Skrypt statystyk:</td>
							<td>{formField type='text' name='statScript' obj='objArticle' func='GetStatScript'}</td>
						</tr>
					</tbody>
				</table>
			{/dropDownContainer*}
			
			{dropDownContainer title="Zdjecia"}
			{*<div class="floatLeft">
					{if $objArticle->GetPicture()}<img src="{$objArticle->GetPictureUrl()}" />{/if}
				</div>*}
				<div class="floatLeft" style="margin-left: 10px;">
					{if $objArticle->GetPictureMini()}<img src="{$objArticle->GetPictureMiniUrl()}" />{/if}
				</div>
				<div class="clearBoth"></div>
				<div class="articlePreviewRight">
					<input type="file" name="filename" >
				</div>
				
				<div class="clearBoth"></div>
				<div class="articlePreviewRight">
					<input type="checkbox" name="deletePhoto" > Usuń obrazek
				</div>				
				<div class="clearBoth"></div>
			{/dropDownContainer}
			{if $idModule == 3}
				{assign var=EditLogo value=false}
			{else}
				{assign var=EditLogo value=true}
			{/if}
			{dropDownContainer title="Logo" isClose=false isHidden=$EditLogo}
				<div class="floatLeft" style="margin-left: 10px;">
					{if $objArticle->GetPicture()}<img src="{$objArticle->GetPictureUrl()}" />{/if}
				</div>
				<div class="clearBoth"></div>
				<div class="articlePreviewRight">
					<input type="file" name="fileLogoName" >
				</div>
				
				<div class="clearBoth"></div>
				<div class="articlePreviewRight">
					<input type="checkbox" name="deletePhoto2" > Usuń obrazek
				</div>				
				<div class="clearBoth"></div>
			{/dropDownContainer}
			
			{if $idModule == 3}
				{assign var=EditUrl value=false}
			{else}
				{assign var=EditUrl value=true}
			{/if}
			{dropDownContainer title="Przekierowanie" isClose=false isHidden=$EditUrl}
				<div class="articlePreviewRight">
					<table width="100%" cellspacing="0" cellpadding="5" border="0" class="commonTable">
					<tbody>
						<tr>
							<td>Url:</td>
							<td>
							
							{formField name='url' class='inputWidth141 input100percent' errorClass='validate' type='text' obj='objArticle' func='GetUrl'}
							{if isset($error.url)}<div style="color: red;" id="actionError" class="validate">{$error.url}</div>{/if}
							</td>
						</tr>
					</tbody>
					</table>
				</div>
				<div class="clearBoth"></div>
			{/dropDownContainer}
		
			{dropDownContainer title="Zajawka"}
			{*<div class="articlePreviewLeft">
					<div class="articlePreviewLeftContent">
						<div class="_zajawkaPhoto articlePreviewPhotoView">
							{if isset($objArticle) && $objArticle->GetPicture()}
								<img src="{$objArticle->GetPictureMiniUrl()}" alt="" />
							{else}
								podczas dodawania będziesz mógł przyciąć swoje zdjęcie do rozmiarów 120x70.
							{/if}
						</div>
						<div class="articlePreviewLeftContentBottom">
							<a class="_lbOn ustawZdjecie" rel="globCropLBox" onclick="{literal}try{ createUploadLightbox(this);} catch(err){ alert(err.message);}{/literal} return false;" href="{if isset($objArticle)}{url SimpleArticle_Index='AjaxPhotoCropper' id=$objArticle->GetId()}{else}{url SimpleArticle_Index='AjaxPhotoCropper'}{/if}" name="ustawZdjecie">&nbsp;</a>
						</div>
					</div>
				</div>*}
				<div class="articlePreviewRight">
					{if isset($objArticle)}
						{assign var='zajawka' value=$objArticle->GetShortnote()}
					{else}
						{assign var='zajawka' value=''}
					{/if}
					{insertCkEditor width='620' height='159' name='zajawka' toolbar='Basic' value=$zajawka}
					<div class="validate" id="shortnoteHiddenError"></div>
					{if isset($error.zajawka)}<div style="color: red;" id="actionError"  class="validate">{$error.zajawka}</div>{/if}
				</div>
				<div class="clearBoth"></div>
			{/dropDownContainer}
			{if $idModule == 3}
				{assign var=EditDescription value=true}
			{else}
				{assign var=EditDescription value=false}
			{/if}
			
			{dropDownContainer title="Treść" isClose=false isHidden=$EditDescription}

				<div class="center">
					{if isset($objArticle)}
						{assign var='tresc' value=$objArticle->GetDescription()}
					{else}
						{assign var='tresc' value=''}
					{/if}
					{insertCkEditor width='620' height='380' name='tresc' toolbar='Formix' value=$tresc}
				</div>

			{/dropDownContainer}

			{*dropDownContainer title="Ustawienia"}
				<table width="100%" cellspacing="0" cellpadding="5" border="0" class="commonTable">
					<tbody>
						<tr>
							<td>Publikuj:</td>
							<td>{formField type='checkbox' name='publikuj' obj='objArticle' func='GetPublication'}</td>
						</tr>
						<tr>
							<td>Publikuj w języku</td>
							<td>{formField type='checkbox' name='publikujWJezyku' obj='objArticle' func='GetLangPublication'}</td>
						</tr>
						<tr>
							<td>Tagi:<br /><small>po przecinkach</small></td>
							<td><input type="text" name="tagi" value="" /></td>
						</tr>
					</tbody>
				</table>
			{/dropDownContainer*}
			{*if $idCategory != 8}
			{dropDownContainer title="Tagi"}
					<table cellpadding="5" cellspacing="0" border="0" class="commonTable" width="100%">
						    <tr>
							<td width="106"><b>Tagi:</b></td>
							<td><input class="input input100percent autocompleter" type="text" value="{if isset($tags)}{$tags|saveInput}{/if}" name="tags" id="tags" />
								<div id="autocomplete_tags" class="autocomplete"></div>
							{if isset($error.tags)}<div style="color: red;" id="actionError"  class="validate">{$error.tags}</div>{/if}
							</td>
						    </tr>
						    
						</table>
			{/dropDownContainer}
			{/if}
			{if isset($customerLink)}
				{$customerLink}
			{/if*}
			{if $idCategory == 9}
			{dropDownContainer title="Dodaj zdjecia"}
			<iframe name="PhotoUpload" id="PhotoUpload" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" height="70" width="625"	src="{url Image='Form'}">
			<noscript>
			Do wyświetlenia konieczne jest działanie ramek (iframe).
			</noscript>
			</iframe>
			{/dropDownContainer}
			{dropDownContainer title="Zdjecia"}
			<div >
			{foreach from=$arrayImage item=image name=photo key=key}
			<div id="image_{$image->GetId()}" style="float:left; text-align: center; border:1px solid #000000; margin-right:5px; margin-bottom: 5px"><img src="{$image->GetFullUrlMiniId($objArticle->GetId())}" alt="test" /><textarea name="image_description_old[{$image->GetId()}]" rows="1" cols="11">{$image->GetDescription()}</textarea>
			<div>
				<a href="#" onclick="DeletePhoto('{url Image=DeleteImage}', '{$image->GetId()}'); return false;"><img src="{$urlStatic}/image/Admin/iconDelete.gif" alt="Usuń" title="Usuń" border="0"/></a>
			</div>
			</div> {/foreach}
			</div>
			<div class="clearBoth"></div>
			<div name="PhotoDisplay" id="PhotoDisplay" class="PhotoDisplay">
			{if isset($arrayPhoto)}
			{foreach from=$arrayPhoto item=file name=photo key=key}<div style="float:left; text-align: center; border:1px solid #000000; margin-right:5px; margin-bottom: 5px"><img src="{$urlStatic}/temp/{$file.th}" alt="test"/></div> {/foreach}
			{/if}
			</div>
			<div class="clearBoth"></div>
			{/dropDownContainer}
			{/if}
		</div>
	</div>
	<div class="cb"></div>
		<div class="panelButtons">
			{if isset($idStructure)}
			<input type="button" class="cancel" value="Anuluj" name="" onclick="document.location.href='{url label=editStructure id=$idStructure}'" />
			{else}
			<input type="button" class="button buttonAnuluj" value="" name="" onclick="document.location.href='{url label=current}'"/>
			{/if}
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

			<input type="submit" value="Zapisz" name="doSimpleArticleEdit"/>
		</div>
	</div>
	<input type="hidden" name="descriptionHidden" id="descriptionHidden" value="" />
<input type="hidden" name="shortnoteHidden" id="shortnoteHidden" value="" />
</form>
