Location: PHPKode > projects > HikaShop > back/views/field/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?option=com_hikashop&amp;ctrl=field" method="post" name="adminForm" >
	<table cellspacing="1" width="100%">
		<tr>
		<td width="50%" valign="top">
			<table class="paramlist admintable">
				<tr>
					<td class="key">
					<label for="data[field][field_realname]">
						<?php echo JText::_( 'FIELD_LABEL' ); ?>
					</label>
					</td>
					<td>
						<input type="text" name="data[field][field_realname]" id="name" class="inputbox" size="40" value="<?php echo $this->escape(@$this->field->field_realname); ?>" />
					</td>
				</tr>
				<tr>
					<td class="key">
					<label for="data[field][field_table]">
						<?php echo JText::_( 'FIELD_TABLE' ); ?>
					</label>
					</td>
					<td>
						<?php 
						if(hikashop::level(1) && empty($this->field->field_id)){
							echo $this->tabletype->display('data[field][field_table]',$this->field->field_table,true);
						}else{
							echo $this->field->field_table.'<input type="hidden" name="data[field][field_table]" value="'.$this->field->field_table.'" />';
						} ?>
					</td>
				</tr>
				<tr>
					<td class="key">
					<label for="data[field][field_namekey]">
						<?php echo JText::_( 'FIELD_COLUMN' ); ?>
					</label>
					</td>
					<td>
					<?php if(empty($this->field->field_id)){?>
						<input type="text" name="data[field][field_namekey]" id="namekey" class="inputbox" size="40" value="" />
					<?php }else { echo $this->field->field_namekey; } ?>
					</td>
				</tr>
				<tr>
					<td class="key">
					<label for="data[field][field_type]">
						<?php echo JText::_( 'FIELD_TYPE' ); ?>
					</label>
					</td>
					<td>
						<?php echo $this->fieldtype->display('data[field][field_type]',@$this->field->field_type,@$this->field->field_table); ?>
					</td>
				</tr>
				<tr class="required">
					<td class="key">
						<label for="data[field][field_required]">
							<?php echo JText::_( 'REQUIRED' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('select.booleanlist', "data[field][field_required]" , '',@$this->field->field_required); ?>
					</td>
				</tr>
				<tr class="required">
					<td class="key">
						<label for="field_options[errormessage]">
							<?php echo JText::_( 'FIELD_ERROR' ); ?>
						</label>
					</td>
					<td>
						<input type="text" id="errormessage" size="80" name="field_options[errormessage]" value="<?php echo $this->escape(@$this->field->field_options['errormessage']); ?>"/>
					</td>
				</tr>
				<tr>
					<td class="key">
					<label for="data[field][field_default]">
						<?php echo JText::_( 'FIELD_DEFAULT' ); ?>
					</label>
					</td>
					<td>
						<?php echo $this->fieldsClass->display($this->field,@$this->field->field_default,'data[field][field_default]',false,'',true); ?>
					</td>
				</tr>
				<tr class="multivalues">
					<td class="key" valign="top">
					<label for="value">
						<?php echo JText::_( 'FIELD_VALUES' ); ?>
					</label>
					</td>
					<td>
						<table>
						<tbody  id="tablevalues">
						<tr><td><?php echo JText::_('FIELD_VALUE')?></td><td><?php echo JText::_('FIELD_TITLE'); ?></td><td><?php echo JText::_('FIELD_DISABLED'); ?></td></tr>
						<?php if(!empty($this->field->field_value) AND is_array($this->field->field_value) AND $this->field->field_type!='zone'){
							foreach($this->field->field_value as $title => $value){
								$no_selected = 'selected="selected"';
								$yes_selected = '';
								if((int)$value->disabled){
									$no_selected = '';
									$yes_selected = 'selected="selected"';
								}
							?>
								<tr><td><input type="text" name="field_values[title][]" value="<?php echo $this->escape($title); ?>" /></td>
								<td><input type="text" name="field_values[value][]" value="<?php echo $this->escape($value->value); ?>" /></td>
								<td><select name="field_values[disabled][]" class="inputbox">
				<option <?php echo $no_selected; ?> value="0"><?php echo JText::_('HIKASHOP_NO'); ?></option>
				<option <?php echo $yes_selected; ?> value="1"><?php echo JText::_('HIKASHOP_YES'); ?></option>
			</select></td></tr>
						<?php } }?>
						<tr><td><input type="text" name="field_values[title][]" value="" /></td>
						<td><input type="text" name="field_values[value][]" value="" /></td>
						<td>
			<select name="field_values[disabled][]" class="inputbox">
				<option selected="selected" value="0"><?php echo JText::_('HIKASHOP_NO'); ?></option>
				<option value="1"><?php echo JText::_('HIKASHOP_YES'); ?></option>
			</select>
						</td></tr></tbody></table>
						<a onclick="addLine();return false;" href='#' title="<?php echo $this->escape(JText::_('FIELD_ADDVALUE')); ?>"><?php echo JText::_('FIELD_ADDVALUE'); ?></a>
					</td>
				</tr>
				<tr class="cols">
					<td class="key">
					<label for="field_options[cols]">
						<?php echo JText::_( 'FIELD_COLUMNS' ); ?>
					</label>
					</td>
					<td>
						<input type="text"  size="10" name="field_options[cols]" id="cols" class="inputbox" value="<?php echo $this->escape(@$this->field->field_options['cols']); ?>"/>
					</td>
				</tr>
				<tr class="rows">
					<td class="key">
					<label for="field_options[rows]">
						<?php echo JText::_( 'FIELD_ROWS' ); ?>
					</label>
					</td>
					<td>
						<input type="text"  size="10" name="field_options[rows]" id="rows" class="inputbox" value="<?php echo $this->escape(@$this->field->field_options['rows']); ?>"/>
					</td>
				</tr>
				<tr class="zone">
					<td class="key">
					<label for="field_options[zone_type]">
						<?php echo JText::_( 'FIELD_ZONE' ); ?>
					</label>
					</td>
					<td>
						<?php echo $this->zoneType->display("field_options[zone_type]",@$this->field->field_options['zone_type'],true);?>
					</td>
				</tr>
				<tr class="size">
					<td class="key">
						<label for="field_options[size]">
							<?php echo JText::_( 'FIELD_SIZE' ); ?>
						</label>
					</td>
					<td>
						<input type="text" id="size" size="10" name="field_options[size]" value="<?php echo $this->escape(@$this->field->field_options['size']); ?>"/>
					</td>
				</tr>
				<tr class="format">
					<td class="key">
						<label for="field_options[format]">
							<?php echo JText::_( 'FORMAT' ); ?>
						</label>
					</td>
					<td>
						<input type="text" id="format" name="field_options[format]" value="<?php echo $this->escape(@$this->field->field_options['format']); ?>"/>
					</td>
				</tr>
			</table>
		</td>
		<td valign="top">
			<table class="paramlist admintable">
				<tr>
					<td class="key">
						<label for="data[field][field_published]">
							<?php echo JText::_( 'HIKA_PUBLISHED' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('select.booleanlist', "data[field][field_published]" , '',@$this->field->field_published); ?>
					</td>
				</tr>
				<?php if(hikashop::level(2) && $this->field->field_table=='entry'){ ?>
				<tr class="limit_to">
					<td class="key">
						<label for="field_options[limit_to_parent]">
							<?php echo JText::_( 'DISPLAY_LIMITED_TO' ); ?>
						</label>
					</td>
					<td>
						<?php
						if(empty($this->field->field_table)){
							echo JText::_( 'SAVE_THE_FIELD_FIRST_BEFORE' );
						}else{
							echo $this->limitParent->display("field_options[limit_to_parent]",@$this->field->field_options['limit_to_parent'],$this->field->field_table,@$this->field->field_options['parent_value']);
						}
						?>
						<span id="parent_value"></span>
					</td>
				</tr>
				<tr class="product_link">
					<td class="key">
						<label for="field_options[product_id]">
							<?php echo JText::_( 'CORRESPOND_TO_PRODUCT' ); ?>
						</label>
					</td>
					<td>
						<span id="product_id" >
							<?php echo (int)@$this->field->field_options['product_id'].' '.@$this->element->product_name; ?> 
							<input type="hidden" name="field_options[product_id]" value="<?php echo @$this->field->field_options['product_id']; ?>" />
						</span>
						<a class="modal" rel="{handler: 'iframe', size: {x: 760, y: 480}}" href="<?php echo hikashop::completeLink("product&task=selectrelated&select_type=field",true ); ?>">
							<img src="<?php echo HIKASHOP_IMAGES; ?>edit.png" alt="edit"/>
						</a>
						<a href="#" onclick="document.getElementById('product_id').innerHTML='<input type=\'hidden\' name=\'field_options[product_id]\' value=\'0\' />';return false;" >
							<img src="<?php echo HIKASHOP_IMAGES; ?>delete.png" alt="delete"/>
						</a>
						<br/>
						<label for="field_options[product_value]"><?php echo JText::_( 'FOR_THE_VALUE' ).' '; ?></label>
						<?php echo $this->fieldsClass->display($this->field,@$this->field->field_options['product_value'],'field_options[product_value]',false,'',true); ?>
					</td>
				</tr>
				<?php }?>
				<tr>
					<td class="key">
						<label for="data[field][field_frontcomp]">
							<?php echo JText::_( 'DISPLAY_FRONTCOMP' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('select.booleanlist', "data[field][field_frontcomp]" , '',@$this->field->field_frontcomp); ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="data[field][field_backend]">
							<?php echo JText::_( 'DISPLAY_BACKEND_FORM' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('select.booleanlist', "data[field][field_backend]" , '',@$this->field->field_backend); ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="data[field][field_backend_listing]">
							<?php echo JText::_( 'DISPLAY_BACKEND_LISTING' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('select.booleanlist', "data[field][field_backend_listing]" , '',@$this->field->field_backend_listing); ?>
					</td>
				</tr>
			</table>
			<?php if(!empty($this->field->field_id)){ ?>
			<br/><br/>
			<fieldset>
			<legend><?php echo JText::_('PREVIEW'); ?></legend>
			<table class="admintable"><tr><td class="key"><?php echo $this->fieldsClass->getFieldName($this->field); ?></td><td><?php echo $this->fieldsClass->display($this->field,$this->field->field_default,'data['.$this->field->field_table.']['.$this->field->field_namekey.']',false,'',true); ?></td></tr></table>
			</fieldset>
			<?php } ?>
		</td>
		</tr>
	</table>
	<div class="clr"></div>
	<input type="hidden" name="cid[]" value="<?php echo @$this->field->field_id; ?>" />
	<input type="hidden" name="option" value="com_hikashop" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="ctrl" value="field" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
Return current item: HikaShop