<?php
/**
 * @version $Id$
 * @package    Contact_Enhanced
 * @subpackage Views
 * @author     Douglas Machado {@link http://ideal.fok.com.br}
 * @author     Created on 28-Jul-09
 * @license		GNU/GPL, see license.txt
 * Contact Enhanced  is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

//--No direct access
defined('_JEXEC') or die('Direct Access NOT Allowed. Please try to access the main page');

JHTML::_('behavior.tooltip');
JHTML::_('behavior.combobox');
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	
<div class="col width-70">
	<fieldset class="adminform">
	<legend><?php echo JText::_( 'Details' ); ?></legend>
	<table class="admintable" style="width:99%">
		<tr>
			<td width="100" align="right" class="key">
				<label for="text">
					<?php echo JHTML::_('tooltip',JText::_('CV_TEXT_TOOLTIP'),JText::_('Text'), '','Text' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="text" id="text" style="width:99%" maxlength="100" value="<?php echo $this->item->text;?>" />
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="ordering">
					<?php echo JHTML::_('tooltip',JText::_('CV_VALUE_TOOLTIP'),JText::_('Value'), '','Value' ); ?> :
				</label>
			</td>
			<td>
				<input class="text_area" type="text" id="value" name="value" style="width:99%" maxlength="100" value="<?php echo $this->item->value;?>" />
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="type">
					<?php echo JHTML::_('tooltip',JText::_('CV_TYPE_TOOLTIP'),JText::_('Type'), '','Type' ); ?> :
				</label>
			</td>
			<td>
				<input type="text" id="type" class="combobox" name="type" value="<?php echo $this->item->type; ?>" />
					<ul id="combobox-type" style="display:none;">
					<?php 
						if(count($this->types) <2){
							echo '<li> </li>';
							echo '<li>'.JText::_('Default').'</li>';
						}
					?>
					<?php
						foreach ($this->types as $type) {
							echo '<li>'.$type->text.'</li>';
						}
					?>
					</ul>

			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="category">
					<?php echo JHTML::_('tooltip',JText::_('CV_CATEGORY_TOOLTIP'),JText::_('Category'), '','Category' ); ?> :
				</label>
			</td>
			<td>
				<input type="text" id="category" class="combobox" name="category" value="<?php echo $this->item->category; ?>" />
					<ul id="combobox-category" style="display:none;">
					<?php 
						if(count($this->types) <2){
							echo '<li> </li>';
							echo '<li>'.JText::_('Default').'</li>';
						}
					?><?php
						foreach ($this->categories as $category) {
							echo '<li>'.$category->text.'</li>';
						}
					?>
					</ul>
				
			</td>
		</tr>
		<tr>
			<td colspan="2" width="100" align="left" class="key" style="text-align:left;">
				<label for="description">
					<?php echo JText::_('Description'); ?> :
				</label>
			</td>
		</tr>
		</tr>
			<td colspan="2"><?php
					$editor = &JFactory::getEditor();
					// parameters : areaname, content, width, height, cols, rows
					echo $editor->display( 'description',  $this->item->description , '90%', '200', '75', '20' ) ;
				?>
			</td>
		</tr>
	</table>
	</fieldset>
</div>
<div class="col width-30">
<fieldset class="adminform">
	<legend><?php echo JText::_( 'Publishing info' ); ?></legend>
	<table class="admintable" style="width:99%">
		<tr>
			<td width="100" align="right" class="key">
				<label for="ordering">
					<?php echo JText::_('Ordering'); ?> :
				</label>
			</td>
			<td>
				<?php echo $this->lists['ordering']; ?>
			</td>
		</tr>
		
		
		
		<tr>
			<td width="100" align="right" class="key">
				<label for="published">
					<?php echo JText::_('Published'); ?> :
				</label>
			</td>
			<td>
				<?php echo $this->lists['published']; ?>
			</td>
		</tr>
	</table>
	</fieldset>
</div>
	<input type="hidden" name="cid[]" value="<?php echo $this->item->id; ?>" />
	<input type="hidden" name="option" value="com_contact_enhanced" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="controller" value="customvalues" />
</form>
