Location: PHPKode > projects > HikaShop > back/views/modules/tmpl/form.php
<?php
/**
 * @package		HikaShop for Joomla!
 * @version		1.4.3
 * @author		hikashop.com
 * @copyright	(C) 2010 HIKARI SOFTWARE. All rights reserved.
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div class="iframedoc" id="iframedoc"></div>
<form action="index.php" method="post" name="adminForm">
	<table width="100%">
		<tr>
			<td valign="top">
				<fieldset class="adminform">
					<legend><?php echo JText::_( 'HIKA_DETAILS' ); ?></legend>
					<table class="admintable" cellspacing="1">
						<tr>
							<td class="key">
								<label for="title">
									<?php echo JText::_( 'HIKA_TITLE' ); ?>
								</label>
							</td>
							<td>
								<input class="text_area" type="text" name="module[title]" id="title" size="35" value="<?php echo @$this->element->title; ?>" />
							</td>
						</tr>
						<tr>
							<td width="100" class="key">
								<?php echo JText::_( 'SHOW_TITLE' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist',  'module[showtitle]', 'class="inputbox"', @$this->element->showtitle ); ?>
							</td>
						</tr>
						<tr>
							<td valign="top" class="key">
								<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist',  'module[published]', 'class="inputbox"', @$this->element->published ); ?>
							</td>
						</tr>
						<?php if($this->element->module=='mod_hikashop'){ ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_CONTENT');?>
							</td>
							<td>
								<?php 
									$html = $this->contentType->display($this->control.'[content_type]',@$this->element->hikashop_params['content_type'],$this->js);
									if($this->include_module){
										echo @$this->element->hikashop_params['content_type'];
										?><input name="<?php echo $this->control; ?>[content_type]" type="hidden" value="<?php echo @$this->element->hikashop_params['content_type'];?>" /><?php
									}else{
										echo $html;
									}
								?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_LAYOUT');?>
							</td>
							<td>
								<?php echo $this->layoutType->display($this->control.'[layout_type]',@$this->element->hikashop_params['layout_type'],$this->js);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_COLUMNS');?>
							</td>
							<td>
								<input name="<?php echo $this->control; ?>[columns]" type="text" value="<?php echo @$this->element->hikashop_params['columns'];?>" />
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_ITEMS');?>
							</td>
							<td>
								<input name="<?php echo $this->control; ?>[limit]" type="text" value="<?php echo @$this->element->hikashop_params['limit'];?>" />
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_DIRECTION');?>
							</td>
							<td>
								<?php echo $this->orderdirType->display($this->control.'[order_dir]',@$this->element->hikashop_params['order_dir']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SUB_ELEMENTS_FILTER');?>
							</td>
							<td>
								<?php echo $this->childdisplayType->display($this->control.'[filter_type]',@$this->element->hikashop_params['filter_type']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('CATEGORY_PARENT');?>
							</td>
							<td>
								<?php $link = hikashop::completeLink('category&task=selectparentlisting&values='.@$this->element->hikashop_params['selectparentlisting'].'&control=params',true); ?>
								<span id="changeParent">
									<?php echo @$this->element->category->category_id.' '.htmlspecialchars(@$this->element->category->category_name, ENT_COMPAT, 'UTF-8');?>
								</span>
								<input class="inputbox" id="paramsselectparentlisting" name="<?php echo $this->control;?>[selectparentlisting]" type="hidden" size="20" value="<?php echo @$this->element->hikashop_params['selectparentlisting'];?>">
								<a id="linkparamsselectparentlisting" title="<?php echo JText::_('SELECT_A_CATEGORY')?>"  href="<?php echo $link;?>" rel="{handler: 'iframe', size: {x: 650, y: 375}}" onclick="SqueezeBox.fromElement(this,{parse: 'rel'});return false;">
									<button onclick="return false"><?php echo JText::_('SELECT'); ?></button>
								</a>
								<a href="#" onclick="document.getElementById('changeParent').innerHTML='';document.getElementById('paramsselectparentlisting').value=0;return false;">
									<img src="<?php echo HIKASHOP_IMAGES?>delete.png"/>
								</a>
							</td>
						</tr>
						<?php }else{ 
						$document=& JFactory::getDocument();
						$js = "window.addEvent('domready', function() { hikashopToggleCart(".(int)@$this->element->hikashop_params['small_cart'].");});"; 
						$document->addScriptDeclaration($js);
							?>
						<tr>
							<td class="key">
								<?php echo JText::_('MINI_CART'); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[small_cart]','onchange="hikashopToggleCart(this.value);"',@$this->element->hikashop_params['small_cart']);?>
							</td>
						</tr>
						<tr id="cart_price">
							<td class="key">
								<?php echo JText::_('SHOW_CART_PRICE'); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[show_cart_price]','',@$this->element->hikashop_params['show_cart_price']);?>
							</td>
						</tr>
						<tr id="cart_proceed">
							<td class="key">
								<?php echo JText::_('SHOW_CART_PROCEED'); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[show_cart_proceed]','',@$this->element->hikashop_params['show_cart_proceed']);?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('SHOW_CART_QUANTITY'); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[show_cart_quantity]','',@$this->element->hikashop_params['show_cart_quantity']);?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('SHOW_CART_DELETE'); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[show_cart_delete]','',@$this->element->hikashop_params['show_cart_delete']);?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('EMPTY_CART_MESSAGE'); ?>
							</td>
							<td>
								<input name="<?php echo $this->control;?>[msg]" type="text" value="<?php echo @$this->element->hikashop_params['msg'];?>" />
							</td>
						</tr>
						<?php } 
							  if($this->element->module=='mod_hikashop'){ ?>
						 <tr>
							<td class="key" valign="top">
								<?php echo JText::_('SYNCHRO_WITH_ITEM');?>
							</td>
							<td>
								<?php 
									echo JHTML::_('select.booleanlist', $this->control.'[content_synchronize]' , '',@$this->element->hikashop_params['content_synchronize']); 
								?>
							</td>
						</tr>
						<tr>
							<td class="key" >
							<?php echo JText::_('MENU'); ?>
							</td>
							<td>
								<?php echo JHTML::_('select.genericlist', $this->hikashop_menu, $this->control.'[itemid]' , 'size="1"', 'value', 'text', @$this->element->hikashop_params['itemid']); ?>
							</td>
						</tr>
						<?php } ?>
					</table>
				</fieldset>
			</td>
			<td valign="top">
				<fieldset id="content_product">
					<legend><?php echo JText::_('PARAMS_FOR_PRODUCTS'); ?></legend>
					<table class="admintable" cellspacing="1" width="100%">
						<?php if($this->element->module=='mod_hikashop'){ ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_FIELD');?>
							</td>
							<td>
								<?php echo $this->orderType->display($this->control.'[product_order]',@$this->element->hikashop_params['product_order'],'product');?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('CONTENT_ON_PRODUCT_PAGE');?>
							</td>
							<td>
								<?php echo $this->productSyncType->display($this->control.'[product_synchronize]' , @$this->element->hikashop_params['product_synchronize']); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('RANDOM_ITEMS');?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[random]' , '',@$this->element->hikashop_params['random']); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ADD_TO_CART_BUTTON');?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[add_to_cart]' , '',@$this->element->hikashop_params['add_to_cart']); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('LINK_TO_PRODUCT_PAGE');?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[link_to_product_page]' , '',@$this->element->hikashop_params['link_to_product_page']); ?>
							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('DISPLAY_PRICE');?>
							</td>
							<td>
								<?php 
									echo JHTML::_('select.booleanlist', $this->control.'[show_price]' , 'onchange="switchDisplay(this.value,\'price_with_tax_line\',\'1\');switchDisplay(this.value,\'show_original_price_line\',\'1\');switchDisplay(this.value,\'show_discount_line\',\'1\');switchDisplay(this.value,\'price_display_type_line\',\'1\');"',$this->element->hikashop_params['show_price']); 
									if(!@$this->element->hikashop_params['show_price']) $this->js .='switchDisplay(\'0\',\'price_display_type_line\',\'1\');switchDisplay(\'0\',\'price_with_tax_line\',\'1\');switchDisplay(\'0\',\'show_original_price_line\',\'1\');switchDisplay(\'0\',\'show_discount_line\',\'1\');';
								?>
							</td>
						</tr>
						<tr id="price_with_tax_line">
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_TAXED_PRICES');?>
							</td>
							<td>
								<?php echo $this->pricetaxType->display($this->control.'[price_with_tax]' , @$this->element->hikashop_params['price_with_tax']); ?>
							</td>
						</tr>
						<tr id="show_original_price_line">
							<td class="key" valign="top">
								<?php echo JText::_('ORIGINAL_CURRENCY_PRICE');?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[show_original_price]' , '',@$this->element->hikashop_params['show_original_price']); ?>
							</td>
						</tr>
						<tr id="show_discount_line">
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_DISCOUNTED_PRICE');?>
							</td>
							<td>
								<?php echo $this->discountDisplayType->display( $this->control.'[show_discount]' ,@$this->element->hikashop_params['show_discount']); ?>
							</td>
						</tr>
						<tr id="price_display_type_line">
							<td class="key">
								<?php echo JText::_('PRICE_DISPLAY_METHOD');?>
							</td>
							<td>
								<?php echo $this->priceDisplayType->display( $this->control.'[price_display_type]',@$this->element->hikashop_params['price_display_type']); ?>
							</td>
						</tr>
						<?php if($this->element->module=='mod_hikashop'){ ?>
					</table>
				</fieldset>
				<fieldset id="content_category">
					<legend><?php echo JText::_('PARAMS_FOR_CATEGORIES'); ?></legend>
					<table class="admintable" cellspacing="1" width="100%">
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ORDERING_FIELD');?>
							</td>
							<td>
								<?php echo $this->orderType->display($this->control.'[category_order]',@$this->element->hikashop_params['category_order'],'category');?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('SHOW_SUB_CATEGORIES');?>
							</td>
							<td>
								<?php echo $this->listType->display($this->control.'[child_display_type]',@$this->element->hikashop_params['child_display_type']);?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('NUMBER_OF_SUB_CATEGORIES');?>
							</td>
							<td>
								<input name="<?php echo $this->control; ?>[child_limit]" type="text" value="<?php echo @$this->element->hikashop_params['child_limit'];?>" />
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset id="layout_div">
					<legend><?php echo JText::_('PARAMS_FOR_DIV'); ?></legend>
					<table class="admintable" cellspacing="1" width="100%">
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TYPE_OF_ITEM_LAYOUT');?>
							</td>
							<td>
								<?php echo $this->itemType->display($this->control.'[div_item_layout_type]',@$this->element->hikashop_params['div_item_layout_type'],$this->js);?>
							</td>
						</tr>
						<?php } ?>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_COLOR');?>
							</td>
							<td>
								<?php echo $this->colorType->displayAll('',$this->control.'[background_color]',@$this->element->hikashop_params['background_color']); ?>
							</td>
						</tr>
						<tr>
							<td class="key">
								<?php echo JText::_('ITEM_BOX_MARGIN');?>
							</td>
							<td>
								<input name="<?php echo $this->control;?>[margin]" type="text" value="<?php echo @$this->element->hikashop_params['margin'];?>" />px
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('ITEM_BOX_ROUND_CORNER');?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[rounded_corners]' , '',@$this->element->hikashop_params['rounded_corners']); ?>
							</td>
						</tr>
						<tr>
							<td class="key" valign="top">
								<?php echo JText::_('TEXT_CENTERED');?>
							</td>
							<td>
								<?php echo JHTML::_('select.booleanlist', $this->control.'[text_center]' , '',@$this->element->hikashop_params['text_center']); ?>
							</td>
						</tr>
					</table>
				</fieldset>
				<fieldset id="layout_list">
					<legend><?php echo JText::_('PARAMS_FOR_LIST'); ?></legend>
					<table class="admintable" cellspacing="1" width="100%">
						<tr>
							<td class="key">
								<?php echo JText::_('UL_CLASS_NAME');?>
							</td>
							<td>
								<input name="<?php echo $this->control;?>[ul_class_name]" type="text" value="<?php echo @$this->element->hikashop_params['ul_class_name'];?>" />
							</td>
						</tr>
					</table>
				</fieldset>
			</td>
		</tr>
	</table>
	<div class="clr"></div>
	<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
	<input type="hidden" name="module[id]" value="<?php echo (int)@$this->element->id; ?>" />
	<input type="hidden" name="module[module]" value="<?php echo $this->element->module; ?>" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="ctrl" value="<?php echo JRequest::getVar('ctrl');?>" />
	<input type="hidden" name="return" value="<?php echo JRequest::getString('return');?>" />
	<input type="hidden" name="client" value="0" />
	<?php echo JHTML::_( 'form.token' );?>
</form>
<?php 
$this->js = "window.addEvent('domready', function() {
		".$this->js."
});"; 
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration($this->js);?>
Return current item: HikaShop