<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{assign var="menuID" value=$menuID|default:''}
<title>{$language.lblAdmin} : {if $menuID}{$language.lblEditMenu}{else}{$language.lblAddNewMenu}{/if}</title>
{include file='CommonStyles.tpl'}
{assign var="jqueryversion" value='1.9'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/inner-formlisting.css" />
{include file='CommonCustomStyles.tpl'}
{literal}

{/literal}
</head>
<body>
<div class="outer_container"> {include file='CommonTop.tpl'}
  <!--End:Header Container-->
  <!--*****************************************END HEADER CONTAINER***************************************-->
  <div class="content_container">
    <div class="content_wrapper">
      <div class="fixing_right">{include file='ContentLanguageOptions.tpl'}</div>	
      <h2>{if $menuID|default:''}{$language.lblEditMenu}{else}{$language.lblAddNewMenu}{/if}</h2>
      	<div class="inner_content_wrapper"> {form->start name="frmMenu"  method="post"}
        {form->hidden name=menuID value=$menuResult.menuID|default:''}
        <div class="form_listing add-new-formlisting" >
          <div class="section_wrap clearfix">
            <h3><span>{$language.lblBasicInfo}</span></h3>
            <div class="clearfix">
              <ul class="left-pane">
             	 <li class="selection clearfix">
                  <div class="leftside01 mandatory"> {$language.lblMenuTitle} </div>
                  <!--End:Left-->
                  <div class="rightside01"> {form->textbox id="menuTitle" name="menuTitle"  value=$menuResult.menuName|default:''  validate="required"  
                    error=$language.errMenuTitle class="textbox" tabindex="1"} </div>
                  <!--End:right--> 
                </li>
              	 <li class="selection clearfix">
                  <div class="leftside01 mandatory"> {$language.lblMenuKey}</div>
                  <!--End:Left-->
                  <div class="rightside01"> 
                  {form->textbox id="menuKey"  name="menuKey" validate="required~*isKey~*callback_checkMenuKey" class="textbox" tabindex="1" 
                  maxlength="120" value=$menuResult.menuKey|default:'' error=$language.errMenuKey|cat:"~*"|cat:$language.errValidMenuKey|cat:"~*"|cat:$language.errKeyAlreayExits}
                </div>
                  <!--End:right-->
                </li>
      			
                <li class="selection clearfix">
                  <div class="leftside01"> {$language.lblMenuDescription} </div>
                  <!--End:Left-->
                  <div class="rightside01"> {form->textarea id="menuDescription" name="menuDescription" value=$menuResult.MenuDesc|default:'' maxlength="200" onkeyup="return ismaxlength(this)" onchange="return ismaxlength(this)" class="length0_50pers" rows="4" cols="4" tabindex="1"} </div>
                  <!--End:right--> 
                </li>
                </ul>
                </div>
                
                 <h3><span>{$language.lblDisplayOptions}</span></h3>
                 <div class="clearfix">
                 <ul class="right-pane">
                 <li class="selection clearfix">
                  <div class="leftside01">{$language.lblPosition} </div>
                  <!--End:Left-->
                  <div class="rightside01"> {form->select tabindex="1" name="position" value=$menuResult.defposition|default:'' caption="->{$language.lblSelect}"  class="width_50per" options=$resPositionList} </div>
                  <!--End:right-->
                </li>
                
                 <li class="selection clearfix menu-add">
                <div class="leftside01">{$language.lblBackgroundImage}</div>
                <div class="rightside01 none label-btm-fix"><span tabindex="1">
                 {form->upload_image
						name		   = "backgroundImage"
						path		   = "uploads/menus/"
					    file		   = $imageName|default:''						
						validate	   = "isImage" 
						error		   = $language.errValidImage
						delete_title   = "{$language.lblDelete}" 
						message_delete = "{$language.msgimageDelConfirm}" 
						size_caption   = $language.lblMaximumFileSize 
						types_caption  = $language.lblFileTypes}
                 </span> </div>
              </li>
                
                 <li class="selection clearfix">
                  <div class="leftside01"> </div>
                  <!--End:Left-->
                  <div class="rightside01">
					 {form->checkbox name="showBackground" value="Yes" checked="{if $menuResult.showBgImage|default:''=='Yes'}True{/if}" tabindex="1"} {$language.lblShowBackground} 
                  </div>
                  <!--End:right-->
                </li>
                 </ul>
                 <ul class="left-pane">
                         <li class="selection clearfix">
                                <div class="leftside01">{$language.lblLinkCssStyle}</div>
                                <div class="rightside01">
                                    {form->textbox name="cssStyle" tabindex="1" maxlength="100" class="textbox" value=$menuResult.cssStyle|default:''} 
                                </div>
                            </li>  
                       
                {assign var="publishFrom" value="{$publishFrom|date_format:$date_format|default:''}"}
              	{assign var="publishTo" value="{$publishTo|date_format:$date_format|default:''}"}
                <li class="selection clearfix">
                            <div class="leftside01"> {$language.lblStartDate} </div>
                              <div class="rightside01">
                        {form->textbox name="publishFrom" tabindex="1"  validate="isDate" error=$language.errValidDate class="date_picker_field" value=$publishFrom}      
                         </div>
                        </li>
                        
                <li class="selection clearfix">
                    <div class="leftside01"> {$language.lblEndDate} </div>
                      <div class="rightside01">
                       {form->textbox name="publishTo" tabindex="1" validate="isDate" error=$language.errValidDate class="date_picker_field" value=$publishTo}
                       {form->hidden name="hiddenStartEndDate" value="0"}
                       {form->validate name="StartEndDatecheck" validate="hiddenStartEndDate->isequal->1~*required" error=$language.errStartEndDate}
                 </div>
                </li>
                        
                 <li class="selection clearfix">
                  <div class="leftside01">  </div>
                  <!--End:Left-->
                  <div class="rightside01">
					{form->checkbox name="showTitle" value="Yes" checked="{if $menuResult.showTitle|default:''=='Yes'}True{/if}" tabindex="1"} {$language.lblShowTitle}
                  </div>
                  <!--End:right-->
                </li>
                
                 <li class="selection clearfix">
                          <div class="leftside01">  </div>
                          <!--End:Left-->
                          <div class="rightside01">
                            {form->checkbox name="showDesc" value="Yes" checked="{if $menuResult.showDesc|default:''=='Yes'}True{/if}" tabindex="1"} {$language.lblShowDescIntroText}
                          </div>
                          <!--End:right-->
                        </li>
                 <li class="selection clearfix">
                  <div class="leftside01">{$language.lblAccess} </div>
                  <div class="rightside01">
                  <select multiple="multiple" tabindex="1" class="width_50per" id="access" name="access[]">
                      {foreach from=$resUserTypesList item="list"} 
                              <option value="{$list[0]|default:''}" {$list[3]|default:''} >{$list[1]|default:''}</option>
                      {/foreach}  
                  </select>
                  </div>
                </li>
                 <li class="selection clearfix">
                  <div class="leftside01 mandatory"> {$language.lblStatus} </div>
                  <!--End:Left-->
                  <div class="rightside01">
                    <div id="perioddiv"> 
					 {form->radio name="menuStatus" class="customradio" options="Active->"|cat:$language.lblActive|cat:"~*Inactive->"|cat:$language.lblInactive value={($menuResult.status|default:'') ? $menuResult.status : Active} tabindex="1"}
					</div>
                  </div>
                  <!--End:right-->
                </li>
                
                 </ul>
                 </div>
                 <div class="submit-block clearfix textto_center"> 
                              <span class="line"></span>
                  {form->submit name="submitMenu" id="submit" class="curve-3"  value="{$language.lblSave}" tabindex="1"} 
                  {$language.lblOr} 
                  {html->anchor href="/custommenu/index/" content=$language.lblCancel tabindex="1"}       
                </div>
   			</div>
        </div>
        <!--End:From Listing-->
        {form->close}
      </div>
      <!--End:Border 2-->
    </div>
    <!--End: left Block-->    
 <div class="clear"></div>
  </div>
  <!--End:Content Container-->
  {include file='CommonBottom.tpl'} </div>
<!--End:Outer Container-->
{if $menuID|default:''}
      {assign var="menuAction" value="Edit"}
      {else}
      {assign var="menuAction" value="Add"}
      {/if}
{form->editor_script}
{form->validate_script form="frmMenu"}
{html->messages_script id="common_message"}
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script>
<script type="text/javascript" src="{$common_js}/uploadImage.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script> 
 <script type="text/javascript" src="{$view_javascript}/custommenu.page.js"></script>
<script  type="text/javascript">
var menuAction = '{$menuAction}';
{literal}
 $(function(){
	 $("#perioddiv input").customInput('');
	});
{/literal}
</script> 
<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script>
</body>
</html>
