<!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="bannerID" value=$bannerID|default:''}
<title>{$language.lblAdmin} :  {$language.lblSiteDesign} :  {if $bannerID}{$language.lblEditBanner}{else}{$language.lblAddNewBanner}{/if}</title>
{include file='CommonStyles.tpl'}
{include file='CommonCustomStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/inner-formlisting.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/right-menu.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" media="screen" />
</head>
<body>
<div class="outer_container">
  {include file='CommonTop.tpl'}
  <!--End:Header Container-->
  <!--*******************************************************START CONTAINER SECTION******************************************************-->
  <div class="content_container2 clearfix">
			<div class="right-sidebar">
				<div class="side_wrapper">
				
					<ul>
						<li>{html->anchor priv_href="adbanner/index/" href="/adbanner/index/" rel="listbanner" class="side_menu_a " content="{$language.lblListPromotionalBanners}<br /><span>{$language.lblSubPromotionalBanner}</span>"} </li>
					</ul>
				</div>
			</div>
			<!--End: Right Block-->
			<div class="left_wrapper">
				<div class="content_wrapper">
    <h2>{if $bannerID}{$language.lblEditBanner}{else}{$language.lblAddNewBanner}{/if}</h2>
    <div class="clear"></div>
    <!--End: Right Block-->
    <div class="inner_content_wrapper">
        <div class="form_listing addbanner" >
          <div class="section_wrap clearfix">
          {form->start name="formPromoBannerAdd" method="post" enctype="multipart/form-data"}
            <ul>
              <li class="selection clearfix">
                <div class="leftside01 mandatory">{$language.lblTitle}</div>
                <!--End:Left-->
                <div class="rightside01">
                 {form->textbox name="bannerCaption" class="textbox width_50per"  tabindex="1"  validate="required~*bannerCaption->database->promotional_banners,bannerCaption,bannerID!='$bannerID' AND bannerStatus!='deleted'" error=$language.errTitle|cat:'~*'|cat:$language.errTitleAlreadyExist}
                </div>
                <!--End:right-->
              </li>
              <li class="selection clearfix">
                <div class="leftside01">
                  {$language.lblPosition}
</div>
                <!--End:Left-->
                <div class="rightside01">
                  {form->select name="bannerPosition" options="$resPromoBannerTypeList" value="$bannerTypeID" class="width_50per" id="bannerPosition" tabindex="1"}
                </div>
                <!--End:right-->
              </li>
              <li class="selection clearfix">
                <div class="leftside01 mandatory">{$language.lblType}</div>
                <!--End:Left-->
                <div class="rightside01">
                  {form->radio name="bannerDisplayType" class="checkbox01 bannerDisplayType" id="bannerDisplayType" options="Image->{$language.lblImage}~*Script->{$language.lblScript}~*Swf->{$language.lblSwf}" value="Image" tabindex="1"}
                  {form->hidden name="bannerType" id="bannerType"}
                   </div>
                <!--End:right-->
              </li>
              <li class="selection clearfix">
              <div id="div_bannerScript">
                <div class="leftside01 mandatory">{$language.lblScript}</div>
                <!--End:Left-->
                <div class="rightside01">
                 {form->textarea name="bannerScript1" class="textbox width-80per" tabindex="1" validate="bannerDisplayType->isequal->Script~*required" error=$language.errScript}
                </div>
                </div>
                <!--End:right-->
                <div class="clear"></div>
              {assign var="bannerImage" value=$resPromoBanner.bannerImage|default:''}
              <div id="div_bannerImage">
                <div class="leftside01 mandatory">{$language.lblBannerImage}</div>
                <!--End:Left-->
                <div class="rightside01" tabindex="1">  
				{form->upload_image
				tabindex="1"
				name="bannerImage"
				validate="bannerDisplayType->isequal->Image~*required~*isImage"
				error=$language.errImage
				id="bannerImage" 
				path= "uploads/adBanner/"
				file= $bannerImage	
				size_caption=$language.lblMaximumFileSize
				types_caption=$language.lblFileTypes
				delete_button="no"}</div>
                    </div>
                     <div class="clear"></div>
                    <div id="div_bannerSwf">
                <div class="leftside01 mandatory">{$language.lblSwf}</div>
                <!--End:Left-->
                <div class="rightside01">
               {if $bannerID}{form->upload name="bannerSwf" id="bannerSwf" tabindex="1" validate="bannerSwf->isFileType->swf" error=$language.errSwfFile}<span style="font-weight:bold; color:#C00;">{$bannerSwf}</span> {else}{form->upload name="bannerSwf" id="bannerSwf" tabindex="1" validate="bannerDisplayType->isequal->Swf~*required~*bannerSwf->isFileType->swf" error=$language.errSwfFile}
                {/if}
                {form->hidden name="previousSwf"}</div>
                    </div>
                <!--End:right-->
                <div class="clear"></div>
              </li>
              <li id="li_bannerURL">
                <div class="leftside01">{$language.lblUrl}</div>
                <!--End:Left-->
                <div class="rightside01">
                  {form->textbox name="bannerURL" class="textbox width_50per"  tabindex="1"  validate="isUrl" error=$language.errValidUrl}
				  <br/><br/>
				  {html->anchor href="ajax/generatecataloglink/?id=bannerURL" id="generateCatalogLink" caption="{$language.lblImportCatUrl}" title="{$language.lblGenerateCatalogLinks}" class="linkbtnt01"}
                  </div>
                <!--End:right-->
                <div class="clear"></div>
              </li>
              <li >
                <div class="leftside01 mandatory">
                  {$language.lblStatus}
				</div>
                <!--End:Left-->
                <div class="rightside01">
                	<div id="perioddiv">
                    
                    {form->radio tabindex="1" name="bannerStatus" class="customradio" options="Active->{$language.lblActive}~*Inactive->{$language.lblInactive}" value="Active"}                 
                    
                  </div>
                </div>
                <!--End:right-->
                <div class="clear"></div>
              </li>
              <li>
              	<div class="submit-block clearfix"> 
                                <span>&nbsp; </span>
                                <div class="leftside01 mandatory">&nbsp;</div>
                              	<div class="rightside01">
                                {form->submit name="submitBanner" class="curve-3" value="{if $bannerID}{$language.lblUpdate}{else}{$language.lblSave}{/if}" tabindex="1"} {$language.lblOr}
                                {if !$previousURL|default:''} {assign var="previousURL" value="/adbanner/details/id/{$bannerTypeID}/"}{/if}
               					{html->anchor id="cancel" name="cancelBanner" content="{$language.lblCancel}" href={$previousURL} tabindex="1"}
                                </div>
                            </div>
                
                <!--End:right-->
                <div class="clear"></div>
              </li>
            </ul>
            </div>
          </div>
          <!--End:From Listing-->
    </div>
    <!--End: left Block-->
    </div>
  </div>
    <!--End: left Block-->
    <div class="clear"></div>
    {include file='CommonBottom.tpl'}
  </div>
  <!--***********************************************************************END CONTAINER SECTION******************************************************-->
  <!--End:Content Container-->
  </div>
<!--End:Outer Container-->
{include file='CommonJavaScriptBottom.tpl'}
<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script>
<script type="text/javascript">
$(function(){
	 $('#perioddiv input').customInput('');
	});	
</script>
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script>
<script type="text/javascript" src="{$view_javascript}/adBanner.page.js"></script>
<script type="text/javascript" src="{$common_js}/uploadImage.plugin.js"></script>
{form->basepath_script}
{form->validate_script form="formPromoBannerAdd"}
{html->messages_script id="common_message"}
<script type="text/javascript" src="{$view_javascript}/adBanner.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script> 
<script type="text/javascript">
{literal}
$(document).ready(function(){
	$("#generateCatalogLink").colorbox({iframe:true, width:"80%", height:"80%"});
});	
{/literal}
</script>
</body>
</html>
