{*
  Template for the edit interface
  $Id: edit_categories.tpl,v 1.00 2006/10/26 20:00:00
*}

<!-- {$smarty.template} -->
<div id="toppage">{if $categorie.id}<a href="show_categories.php?id={$categorie.id}">{$categorie.q_longname}</a>{else}<a href="#">{$lang.newcategorie}</a>{/if}</div>
{if $categorie.id || $xmlimport}
<div id="actions">
<table id="tableshow" width="100%" cellpadding="2" cellspacing="0" border="0">
	<tr>
		<td>
			<form action="edit_categories.php" name="editform">
					<span class="onglet-admin">
					<input type="submit" value="{$lang.newdata}" />
					</span>
			</form>
			<form action="edit_categories.php" name="editform">
					<input type="hidden" name="id" value="{$categorie.id}"/>
					<span class="onglet-admin">
					<input type="submit" value="{$lang.edit}" />
					</span>
			</form>
			<form action="delete.php" name="deleteform">
					<input type="hidden" name="id" value="{$categorie.id}"/>
					<input type="hidden" name="cat" value="13"/>
					<span class="onglet-admin">
					<input type="submit" value="{$lang.del}" onclick="return(confirm('{$categorie.lastname|escape:javascript}: {$lang.really_del}?'))" />
					</span>
			</form>
			<form action="manage_categories.php" name="manageform">
				<span class="onglet-admin">
				<input type="submit" value="{$lang.manage}" />
				</span>
			</form>
		</td>
	</tr>
	<tr>
		<td>
	
		{if $categorie.id}
			<form action="show_categories.php" method="get" name="show">
				<input type="hidden" name="id" value="{$categorie.id}" />
				<span class="onglet">
				<input type="submit"  value="{$lang.card}" />
				</span>
			</form>
		{else}
			<form action="edit_categories.php" method="get" name="import">
				<input type="hidden" name="import" value="xml" />
				<span class="onglet">
				<input type="submit"  value="Import" />
				</span>
			</form>
		{/if}
		{if $prev_id || $next_id}
				<form action="edit_categories.php" name="prevform">
					<input type="hidden" name="id" value="{$prev_id}"/>
					<span class="onglet">
					<input type="submit"  value="<" {if !$prev_id}disabled="disabled"{/if} accesskey="," />
					</span>
				</form>
				<form action="edit_categories.php" name="nextform">
					<input type="hidden" name="id" value="{$next_id}"/>
					<span class="onglet">
					<input type="submit"  value=">" {if !$next_id}disabled="disabled"{/if} accesskey="." />
					</span>
				</form>
		{/if}
		
		</td>
	</tr>
</table>
		<!-- /actions -->
		
</div>	 
	{/if}


<script language="JavaScript" type="text/javascript" src="javascript/edit.js"></script>


{if $http_error}<div class="center">{$http_error}</div>{/if}
<form action="edit_categories.php" id="edi" name="edi" method="post" enctype="multipart/form-data">
  <input type="hidden" name="id" id="id" value="{$categorie.id}" />
  <input type="hidden" name="save" id="save" value="1" />
<div id="pagecontent">
<table id="tableshow" width="100%" cellpadding="2" cellspacing="0" border="0">
	<tr>
		<td class="lineeven"><b>» {$lang.longname} :</b></td>
		<td class="lineeven">
		<input type="text" name="longname" id="longname" value="{$categorie.q_longname}"  size="40" maxlength="255" />
		</td>
	</tr>
	<tr>
		<td class="lineodd"><b>» {$lang.shortname} :</b></td>
		<td class="lineodd">
		<input type="text" name="shortname" id="shortname" value="{$categorie.q_shortname}"  size="40" maxlength="255" />
		</td>
	</tr>
	<tr>
		<td class="lineodd"><b>» {$lang.category} :</b></td>
		<td class="lineodd">
		<select name="parent">
			<option value="0">---{$lang.category}---</option>
			{foreach item=parent from=$categoryselect}
			<option value="{$parent.id}" {if $parent.id == $categorie.q_parent}Selected{/if}>{$parent.longname}</option>
			{/foreach}
		</select>
		</td>
	</tr>		
	<tr>
		<td class="lineodd"><b>» {$lang.country} :</b></td>
		<td class="lineodd">
		<select name="country">
			<option value="0">---{$lang.country}---</option>
			{foreach item=country from=$countryselect}
			<option value="{$country.id}" {if $country.id == $categorie.q_country}Selected{/if}>{$country.val}</option>
			{/foreach}
		</select>
		</td>
	</tr>
	<tr>
		<td class="lineeven"  style="vertical-align:middle;"><b>» {$lang.active}:<input type="checkbox" name="active" value="1"{if $categorie.q_active} checked{/if}></b></td>
        <td style="vertical-align:middle;" class="lineeven"><b>» {$lang.visible}:<input type="checkbox" name="visible" value="1"{if $categorie.q_visible} checked{/if}> </b></td>
    </tr>
	<tr>
    	<td class="lineodd"><b>» {$lang.logourl} :</b></td>
        <td class="lineodd"> 
        <input type="text" name="imgurl" id="imgurl" value="{$categorie.q_imgurl}"  size="40" maxlength="255" />
        </td>
    </tr>		
    <tr>
    <td class="lineeven"><b>» {$lang.logoupload} :</b></td>
    <td class="lineeven"><input type="file" name="coverupload" id="coverupload" size="35" /></td>
    </tr>
    <tr>
    	<td class="lineodd"><b>» {$lang.comments} :</b></td>
        <td class="lineodd"><textarea style="width:95%; height:100px;" name="plot" id="plot" wrap="virtual">{$categorie.q_plot}</textarea></td>
    </tr>
	
	<tr>
	<td colspan="2">	
		<div>
		  	<span class="onglet">
			<input style="width:100%;" type="submit" value="{$lang.save}" id="savebutton" accesskey="s" />
			</span>
			<span class="onglet">
			<input style="width:100%;" type="button" value="{$lang.back}" id="backbutton" onclick="javascript:history.go(-1);" accesskey="b" />
			</span>
		</div>
	</td>
	</tr>
  </table>
</form>

<script language="JavaScript" type="text/javascript">
	document.edi.longname.focus();
</script>


</div>
<!-- /content -->
