<!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" />
<title>{$language.lblAdmin}: {$language.lblMenuSiteDesign}:{$language.lblBanner}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link href="{$view_styles}/jqueryui.plugin.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/inner-formlisting.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}/ui.daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" media="screen" />
<link rel="stylesheet" href="{$view_styles}/chosen.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/add-edit.css" />
{include file='CommonCustomStyles.tpl'}
{literal}
<style type="text/css">
textarea#bannerContent{
	display:none!important;
	}
.fileuploader_edit_section {display:none !important;}
</style>
{/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 add-new-formlisting">
    <div class="fixing_right">{include file='ContentLanguageOptions.tpl'}</div>
    <h2> {if $bannerID|default:''}{$language.lblEditBanner}{else}{$language.lblAddNewBanner}{/if}</h2>
	{form->start name="formBanner" method="post" action="" enctype="multipart/form-data"}
     <div class="section_wrap clearfix ">	
            <!--start: left pane -->
            <div class="left-pane clearfix">
                <div class="form_listing">
                    <ul>
                        <li class="clearfix">
                                <div class="leftside01 mandatory">
                                        {$language.lblMenuBrands}
                                </div>
                                <!--End:Left-->
                                <div class="rightside01"> 
                                        {form->select class="select" name="brandID" caption="->{$language.lblSelect}" options=$listBrand validate="required" error=$language.errFranchisee}
                                </div>
                                <!--End:right-->
                          </li>
                        <li class="clearfix">
                            <div class="leftside01 mandatory">{$language.lblTitle} </div>
                            <div class="rightside01">
                  			{form->textbox  name="bannerTitle" maxlength="100"  class="textbox" validate="required" error=$language.errTitle tabindex="1"}
                            </div>
                        </li>
                         <li class="clearfix">
                            <div class="leftside01">{$language.lblLink}</div>
                            <div class="rightside01">
                              {form->textbox name="bannerLink"  tabindex="2"  class="textbox"  validate="required" error=$language.errValidUrl}
							  <br/><br/>
							  {html->anchor href="ajax/generatecataloglink/?id=bannerLink" id="generateCatalogLink" caption="{$language.lblImportCatUrl}" title="{$language.lblGenerateCatalogLinks}" class="linkbtnt01"}
                            </div>
                        </li>
                        <li class="selection clearfix">
                            <div class="leftside01 ">{$language.lblTarget} </div>
                            <div class="rightside01">
                                {form->select  name="bannerTarget" tabindex="3" class="select-box" options="newWindow->newWindow~*sameWindow->sameWindow"}
                            </div>
                        </li>
                        <li class="selection clearfix">
                            <div class="leftside01 mandatory">{$language.lblTextBlend}</div>
                            <div class="rightside01">
								{form->hidden name="imageBannerTextBlend" value=$bannerTextBlend|default:''}
                                {form->select class="select-box" tabindex="4"  name="bannerTextBlend" options="yes->{$language.lblYes}~*no->{$language.lblNo}"}
                            </div>
                        </li>
						
                        <li class="selection clearfix">
                            <div class="leftside01">{$language.lblStartDate}</div>
                            <div class="rightside01">
 				{if $bannerStartTime|default:''!="" && $bannerStartTime!="0000-00-00 00:00"} 
                    {assign var="bannerStartTime" value=$bannerStartTime}
                    {else}
                    {assign var="bannerStartTime" value=""}
                    {/if} 
                     {form->textbox name="bannerStartTime"  tabindex="5"   error=$language.errPassedTime class="date_picker_field"}    </div>
                        </li>
                        <li class="selection clearfix">
                            <div class="leftside01 ">{$language.lblEndDate}</div>
                            <div class="rightside01">
 				{if $bannerEndTime|default:''!=""  && $bannerEndTime!="0000-00-00 00:00"} 
                    {assign var="bannerEndTime" value=$bannerEndTime}
                    {else}
                    {assign var="bannerEndTime" value=""}
                    {/if}
                    {form->textbox  tabindex="6"  name="bannerEndTime"  class="date_picker_field"}
                    {form->hidden name="hiddenStartEndDate" value="2"}
                    {form->validate name="StartEndDatecheck"  validate="hiddenStartEndDate->isequal->0~*required" error=$language.errStartEndDate} 
                            </div>
                        </li>
                        <li class="selection clearfix">
                        <div class="leftside01">{$language.lblBannerCssStyle}  </div>
                        <div class="rightside01 editor" tabindex="12">
                         {form->textbox  name="bannerCssStyle"   class="textbox"}
                        </div>
                    </li>
					<li class="selection clearfix">
						<div class="leftside01 mandatory">{$language.lblBannerLocation}</div>
						<div class="rightside01">
                                                 {form->hidden name="hiddenBannerLoc" value=$bannerLoc|default:''}    
						{form->select class="select-box" tabindex="5"  name="bannerLoc" options="1->{$language.lblMenuItem}~*2->{$language.lblHomePage}~*3->{$language.lblProductCategories}" }
						</div> 			
					</li>
                    <li class="selection clearfix">
                            <div class="leftside01 mandatory">{$language.lblBannerPlatform} </div>
                            <div class="rightside01">
                                {form->select  name="bannerPlatform" tabindex="3" class="select-box" options="desktop->{$language.lblDesktop}~*mobile->{$language.lblMobile}~*mobileApp->{$language.lblMobileapp}" }
                            </div>
                    </li>					
					<li class="selection clearfix">
						<div id="categories"> 
							{if $bannerID|default:''>0 && $bannerLoc==3} 
								{include file='AjaxProductCategories.tpl'} 
							{else if $bannerID|default:''>0 && $bannerLoc==4} 
								{*{include file='AjaxProductBrands.tpl'} *}
							{/if}
						</div>
						<div class=" rightside01">
                                                {form->validate name="categorySelected" validate="bannerLoc->isequal->3~*required" error=$language.errSelectAnyCategory}
						 {form->validate name="brandSelected" validate="bannerLoc->isequal->4~*required" error=$language.errSelectAnyBrand}
						 </div>
                                                 
                         <div class="form-group selection menuitem_display">
                            <div class="leftside01 mandatory">{$language.lblMenuItems}</div>
                            <!--End:Left-->
                            <div class="rightside01" > 
                                            <span id="menuitems" ></span>
                                            {form->validate name="menuitemSelected" validate="bannerLoc->isequal->1~*required" error=$language.errSelectAnyMenuitem}
                                            {form->hidden  name="menuItemIDSelected" value=$bannerID|default:''}
                            </div>
                            <!--End:right-->
                         </div>
				    </li>
                                                
                    </ul>
                </div>
            </div>
            <!--end: left pane -->
            <!--start: right pane -->
            <div  class="right-pane clearfix">
                <div class="form_listing">
                    <ul>
                    	<li class="selection clearfix">
                            <div class="leftside01 ">{$language.lblType}</div>
                            <div class="rightside01">
                                {form->radio class="bannerDisplayType" tabindex="7"  name="bannerDisplayType" options="Image->{$language.lblImage}~*Swf->{$language.lblSwf}" value="{if $bannerDisplayType|default:''}{$bannerDisplayType}{else}Image{/if}"}
                                {form->hidden name="bannerType" id="bannerType"}
                            </div>
                        </li>
                        <li class="selection clearfix" id="bannerSize">
                            <div class="leftside01 ">{$language.lblBannerSize}</div>
                            <div class="rightside01">
                                {form->radio class="bannerSize" tabindex="7"  name="bannerSize" options="Small->{$language.lblSmall}~*Large->{$language.lblLarge}" value=""}
                            </div>
                        </li>
                        <li class="selection clearfix">
                        <div id="div_bannerImage">
                            <div class="leftside01  mandatory">{$language.lblBannerImage}</div>
                            <div class="rightside01 label-btm-fix" tabindex="13">  
                            {form->upload_image 
								   name			 = "bannerImage" 
								   validate		 = "bannerDisplayType->isequal->Image~*required~*isImage"
								   error		 = $language.errbannerImage|cat:$language.errbannerValidImage|default:''
								   path			 = "uploads/banner/"
								   file			 = $bannerImage|default:''
								   size_caption  = $language.lblMaximumFileSize 
							       types_caption = $language.lblFileTypes}
                              </div>
                        </div>
                        <div id="div_bannerSwf">
                            <div class="leftside01 mandatory">{$language.lblSwf}</div>
                            <div class="rightside01">
                            {form->upload name="bannerSwf" id="bannerSwf" tabindex="6"}<span style="font-weight:bold; color:#C00;">{$bannerSwf|default:''}</span> 
                            {form->hidden name="previousSwf" value="{$bannerSwf|default:''}"}
                            {form->validate name="validBannerSwf" validate="bannerDisplayType->isequal->Swf~*previousSwf->required~*previousSwf->isFileType->swf" error=$language.errSwfFile}
                            </div>																
                    </div>													
                    </li>
																							
                    </ul>
                </div>
            </div>																	
            <!--end: right pane -->
            <div class="clearfix"></div>
             <div class="form_listing">
        	 <div class="forlisting_fullwidth">
                <ul>														
                    <li class="selection clearfix" id="content">
                        <div class="leftside01">{$language.lblContent}  </div>
                        <div class="rightside01 editor" tabindex="12">
						{form->editor  mode="simple" skin=2 name="bannerContent"  class="text-area-01" enable_css="Yes" uploads="editor-images/"}
                        </div>
                    </li>
																					
                    <li class="selection clearfix">
                        <div class="leftside01 mandatory status">{$language.lblStatus}</div>
                        <div class="rightside01">
                            <div id="perioddiv">
                            {form->radio name="bannerStatus" class="customradio" options="Active->{$language.lblActive}~*Inactive->{$language.lblInactive}" value="{if $bannerStatus}{$bannerStatus}{else}Active{/if}" tabindex="7"}   
                            </div>
                        </div>
                    </li>
                </ul>
            </div>													
            </div>																	
        </div><!--section wrap :: Ends-->
        <div class="submit-block clearfix textto_center"> 
        <span>&nbsp; </span>
        {form->submit name="submitBanner" tabindex="8" id="submitBanner" class="curve-3"  value="{$language.lblSave}"} {$language.lblOr}
         {if !$history}{assign var="history" value="/banner/"}{else} {if $bannerID< 1}{assign var="history" value="/banner/"}{/if}{/if}
         {html->anchor href=$history name="cancelCharity" tabindex="9"  caption="{$language.lblCancel}"}
        </div>
  </div>																	
  </div>													
  {form->close}
  <!--End:Content Container-->
  {include file='CommonBottom.tpl'}
</div>
{form->editor_script names="bannerContent"}

{form->rootpath_script}
{form->basepath_script}
<!--End:Outer Container-->
{include file='CommonJavaScriptBottom.tpl'}
<script type="text/javascript" src="{$common_js}/jquery.ui.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script> 
<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}/banner.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script>
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script> 
<script src="{$view_javascript}/chosen.pluggin.js"></script>
{form->validate_script form="formBanner"}
<script type="text/javascript">
var lblSelect	=	"{$language.lblSelectProductType}";
{literal}
 $(function(){
	 $("#perioddiv input").customInput('');
});
$(document).ready(function(){
	$("#generateCatalogLink").colorbox({iframe:true, width:"80%", height:"80%"});
});	
{/literal}

</script>
</body>
</html>
