
{include file="../head.tpl"}

{if $error}
<ul>
	<li>{$error}</li>
</ul>
{/if}

<table width="100%"  border="0" cellspacing="0" cellpadding="5" class="tableborder">
	<tr>
		<td colspan="2" class="header">{$langadmin.menue_add_poll_item}</td>
	</tr>

	<form action="poll.php?action=save_item" method="post">
	{if $smarty.request.subaction=="edit"}
	<input type="hidden" name="id" value="{$smarty.request.id}" />
	{else}
	<input type="hidden" name="id" value="{$id}" />
	{/if}
	<input type="hidden" name="redirid" value="{$smarty.request.redirid}" />
	{if $iserror==1}
	<input type="hidden" name="area_id" value="{$area}" />
	{else}
	<input type="hidden" name="area_id" value="{$smarty.request.area}" />
	{/if}
	
	<input type="hidden" name="item_id" value="{$item->id|default:"-1"}" />
	<tr>
		<td class="firstrow">{$langadmin.title}</td>
		<td class="secondrow">
			<input type="text" name="title" size="20" value="{$item->title}" />
		</td>
	</tr>
	<tr>
		<td class="firstrow">{$langadmin.color}</td>
		<td class="secondrow">
			<select name="color">
				{foreach from=$color_keys item=color_key}
				<option value="{$colors.$color_key}"
					{if $colors.$color_key == $item->color or $smarty.post.color == $colors.$color_key}
						selected
					{/if}
				>{$color_key}</option>
				{/foreach}
			</select>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="firstrow"> 
			<input name="submit" type="submit" class="button" value="{$langadmin.save}" />
	  </td></tr>
	</form>
</table>
{include file="../foot.tpl"}