<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2008 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts EasyCart                      |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>

<script language="javascript" type="text/javascript" src="http://localhost/vistacart/app/webroot/js/jquery.js"></script>
<script>
function validateForm()
{	
    with(document.Custom)
	{ 
		  var errorstr = '';
		  var msgstr = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n\n";
		  if($.trim($('#CustomId').val())=='') { errorstr += "- Please Enter Category Name.\n"; CustomId.focus();}
		  if($.trim($('#CustomCustomName').val())=='') { errorstr += "- Please Enter Category Name.\n"; CustomCustomName.focus();}
		  if (errorstr != '')
		   {
			msgstr = msgstr + errorstr;
			alert(msgstr);
			return false;
		  }
	}	
	reurn true;  
}
</script>

<?php echo $form->create('Custom', array('name' =>'Custom'));?>
<div><font color="#FF0000"><?php $session->flash(); ?>asdas</font></div>
<table width="610"  border="0" cellspacing="0" id="mytable">
  <tr>
    <th colspan="2">Add Custom Values</th> 
  </tr>
<tr><td width="121">Custom Fields<span class="required_field">*</span></td>
<td width="485">
<div><?php echo $form->input('id', array('options' => $cfields,'label' => ' ')); ?></div>
</td>
</tr>
<tr><td>Custom Values<span class="required_field">*</span></td>
<td>
<div><?php echo $form->input('custom_name', array('label' => ' '));?></div>
</td>
</tr>
</table>
<div style="padding-left:175px;"><input type="button" value="Save" onClick="return validateForm();">&nbsp;&nbsp;<input type="button" value="Cancel" onClick="javascript:history.go(-1);"></div>
<?php echo $form->end(); ?>