<?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.venue_name.value == ""){
		alert( "<?php echo JText::_('You must provide venue name.', true ); ?>" );
	} else {
		<?php
			$editor = JFactory::getEditor();
			echo $editor->save('description');
	     ?>
		submitform( pressbutton );
	}
}
//-->
</script>

<form action="index.php" method="post" name="adminForm" id="adminForm">
	<div class="col100">
		<fieldset class="adminform">
			<legend>
			<?php echo JText::_('Venue Details'); ?>
			</legend>
			<table class="admintable">
				<tr>
					<td width="100" class="key"><label for="venue_name"> <?php echo JText::_('Venue Name'); ?>:
					</label>
					</td>
					<td><input class="input" type="text" name="venue_name"
						id="venue_name" size="32" maxlength="50"
						value="<?php echo $this->venue->venue_name;?>" />
					</td>
				</tr>
				<tr>
					<td width="100" class="key"><label for="type_desc"> <?php echo JText::_('Description'); ?>:
					</label>
					</td>
					<td><?php
					$editor = JFactory::getEditor();
					echo $editor->display('description', $this->venue->description, '100%', '150', '', '20', false);
					?>
					</td>
				</tr>

				<tr>
					<td width="100" class="key"><label for="seats"> <?php echo JText::_('Seats'); ?>:
					</label>
					</td>
					<td><input class="input" type="text" name="seats" id="seats"
						size="10" maxlength="50" value="<?php echo $this->venue->seats;?>" />
					</td>
				</tr>


				<?php if ($this->params->get('display_country',1)>0){ ?>
				<tr>
					<td width="100" class="key"><label for="country"> <?php echo JText::_('Country'); ?>:
					</label>
					</td>
					<td><?php echo $this->countries;?>
					</td>
				</tr>
				<?php }?>


				<?php if ($this->params->get('display_state',1)>0){ ?>
				<tr>
					<td width="100" class="key"><label for="state_code"> <?php echo JText::_('State'); ?>:
					</label>
					</td>
					<td><?php echo $this->states;?>
					</td>
				</tr>
				<?php }?>



				<?php if ($this->params->get('display_city',1)>0){ ?>
				<tr>
					<td width="100" class="key"><label for="state_code"> <?php echo JText::_('City'); ?>:
					</label>
					</td>
					<td><?php echo $this->cities;?>
					</td>
				</tr>
				<?php }?>

				<tr>
					<td width="100" class="key"><label for="address"> <?php echo JText::_('Address'); ?>:
					</label>
					</td>
					<td><input class="input" type="text" name="address" id="address"
						size="80" value="<?php echo $this->venue->address;?>" />
					</td>
				</tr>

				<tr>
					<td width="100" class="key"><label for="published"> <?php echo JText::_('Published'); ?>:
					</label>
					</td>
					<td><?php echo $this->published;?>
					</td>
				</tr>
				
				<tr>
					<td width="100" class="key"><label for="seats_chart"> <?php echo JText::_('Seats Chart'); ?>:</label>
					</td>
					<td><input type="text" name="seats_chart" id="seats_chart"
						value="<?php echo $this->venue->seats_chart;?>"
						readonly="readonly" />
						<div class="button2-left">
							<div class="blank">
								<a class="modal" title="Select"
									href="index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;asset=com_menus&amp;author=&amp;fieldid=seats_chart&amp;folder="
									rel="{handler: 'iframe', size: {x: 800, y: 500}}"> <?php echo JText::_('JLIB_FORM_BUTTON_SELECT');?>
								</a>
							</div>
						</div>
						<div class="button2-left">
							<div class="blank">
								<a title="Clear" href="#"
									onclick="document.getElementById('seats_chart').value=''; document.getElementById('seats_chart').onchange();">
									<?php echo JText::_('JLIB_FORM_BUTTON_CLEAR');?> </a>
							</div>

						</div>
					</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->venue->id;?>" /> <input
		type="hidden" name="task" value="save" /> <input type="hidden"
		name="controller" value="venue" />
		<?php echo JHTML::_( 'form.token' ); ?>

</form>
