<?php
/**
 * @version		3.0.0
 * @package		JomLand TicketCenter
 * @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
 * @link 		www.jomland.com
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access'); ?>

<script language="javascript" type="text/javascript">
		<!--
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}
			// do field validation
			
			if (form.state_name.value == "") {
				alert( "<?php echo JText::_( 'You must provide State Name.', true ); ?>" );
			} 
			else {
				submitform( pressbutton );
			}
		}
		//-->
		</script>


<form action="index.php" method="post" name="adminForm" id="adminForm">
	<div class="col100">
		<fieldset class="adminform">
			<legend>
			<?php echo JText::_( 'Country Details' ); ?>
			</legend>
			<table class="admintable">
				<tr>
					<td class="key"><label for="code"> <?php echo JText::_('State Code' ); ?>:
					</label>
					</td>
					<td><input class="input" type="text" name="code" id="code" size="2"
						maxlength="2" value="<?php echo $this->state->code;?>" />
					</td>
				</tr>

				<tr>
					<td class="key"><label for="state_name"> <?php echo JText::_('State Name'); ?>:
					</label>
					</td>
					<td><input class="input" type="text" name="state_name"
						id="state_name" size="30" maxlength="50"
						value="<?php echo $this->state->state_name;?>" />
					</td>
				</tr>



				<tr>
					<td class="key"><label for="country_id"> <?php echo JText::_('Country'); ?>:
					</label>
					</td>
					<td><?php echo $this->countries;?>
					</td>
				</tr>


				<tr>
					<td class="key"><label for="publish"> <?php echo JText::_('Published'); ?>:
					</label>
					</td>
					<td><?php echo $this->published;?>
					</td>
				</tr>


			</table>
		</fieldset>
	</div>
	<div class="clr"></div>

	<input type="hidden" name="option" value="com_jlticketcenter" /> <input
		type="hidden" name="id" value="<?php echo $this->state->id;?>" /> <input
		type="hidden" name="task" value="save" /> <input type="hidden"
		name="controller" value="state" />
		<?php echo JHTML::_('form.token');?>
</form>
