<!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="feedID" value=$feedID|default:''}
<title>{$language.lblAdmin} : {if $feedID>0}  {$language.lblFeedEdit}  {else} {$language.lblFeedAddNew} {/if}</title>
{include file="CommonStyles.tpl"}
{include file="CommonCustomStyles.tpl"}
{include file="CommonJavaScript.tpl"}
<link rel="stylesheet" type="text/css" href="{$view_styles}/add-edit.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/inner-formlisting.css" media="screen" />		
</head><body>
<div class="outer_container"> {include file='CommonTop.tpl'} 
  <!--End:Header Container--> 
  <!--*************************************************START CONTAINER SECTION*************************************************-->
  <div class="content_container equalHeight">
    <div class="content_wrapper">
     <noscript>
      <div class="message_info">{$language.lblJsEnable} !!</div>
      </noscript>
      <div class="fixing_right space-t-l">{include file='ContentLanguageOptions.tpl'}</div>
      <h2>
		{if $feedID>0}
			{$language.lblFeedEdit}
		{else}	
			{$language.lblFeedAddNew} 
			
		{/if}
		</h2>
	{form->start name="formFeed" action="" method="post"}
	{form->hidden name="feedID" value="{$feedID}"} 
	 <div class="inner_content_wrapper"> 
     <div id="common_message"></div>
 <div class="tab-content-outer  clearfix ">
 		<div class="left_block fixing_left">
              <div class="tab-block-01">
                <h2>{html->anchor rel="product-details-save" caption="<span>&nbsp;</span>{$language.lblFeedDetails}"}</h2>
              </div>
              <ul class="left-tab" id="maintab">
                <li class="sub">{html->anchor rel="basic-info" caption="<span>{$language.lblGeneral}</span>" class="left-tab-a active" id="general"}</li>
                 
               
              </ul>
            </div>
            <!-- tab General tab-1 starts -->              
             <div class="right_block fixing_right">
		   <div id="basic-info-section" class="save-floating-section">
        <div class="cm-buttons-floating" id="menuSubmit">
			<div class="submit-position"> 
				{form->submit 
					name="submitFeed" 
					id="submitFeed"  
					class="curve-3 button03" 
					value="{$language.lblSave}" 
					tabindex="9"} 
				
				{$language.lblOr}
				
				{html->anchor 
					priv_href="brand/index/" 
					href="/googlepla/index/" 
					tabindex="10"
					content=$language.lblCancel} 
			</div>
        </div>
        <div class="cm-buttons"> </div>
        </div>
            <div  class="tabpane" style="display:block">
            
              <div class="tabpane_inner"> <span class="BreadCrump">
                <ul class="clearfix">
                  <li> {$language.lblFeedDetails} &raquo; </li>
                  <li> <span> {$language.lblGeneral} </span></li>
                </ul>
                </span>
                <div class="form_listing">
			<ul class="levl-00">
			{if $feedID >0 }
				<li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedSched}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
				{if ( ($datafeed->getDayOfMonth()=="") && ($datafeed->getWeekday()=="") )} 
					{assign var="feedsh" value=Daily}
				{else if ( ($datafeed->getDayOfMonth()!="") && ($datafeed->getWeekday()=="") )}
					{assign var="feedsh" value=Monthly}
				{else if ( ($datafeed->getDayOfMonth()=="") && ($datafeed->getWeekday()!="") )}
					{assign var="feedsh" value=Weekly}
				{/if}
					{form->select 
							caption="->{$language.lblSelect}" value="{$feedsh}"  class="select-small" 
							tabindex="6"
							name="feedShed"   options="Monthly->{$language.lblFeedMonthly}~*Weekly->{$language.lblFeedWeekly}~*Daily->{$language.lblFeedDaily}" validate="required" 
						error="{$language.errFScheduleRequired}"} 
					{form->select 
							caption="->{$language.lblSelect}" value="{$datafeed->getDayOfMonth()}"  class="select-small"
							tabindex="7"
							name="feedShedDate" options="01->01~*02->02~*03->03~*04->04~*05->05~*06->06~*07->07~*08->08~*09->09~*10->10~*11->11~*12->12~*13->13~*14->14~*15->15~*16->16~*17->17~*18->18~*19->19~*20->20~*21->21~*22->22~*23->23~*24->24~*25->25~*26->26~*27->27~*28->28~*29->29~*30->30" validate="feedShed->isEqual->Monthly~*required" 
						error="{$language.errFScheduleRequired}"} 
					{form->select 
							caption="->{$language.lblSelect}" value="{$datafeed->getWeekday()}"  class="select-small"
							tabindex="8"
							name="feedShedDay" options="sunday->sunday~*monday->monday~*tuesday->tuesday~*wednesday->wednesday~*thursday->thursday~*friday->friday~*saturday->saturday" validate="feedShed->isEqual->Weekly~*required" 
						error="{$language.errFScheduleRequired}"}
					{form->select 
							caption="->{$language.lblSelect}" value="{$datafeed->getHour()}"  class="select-small"
							tabindex="9" 
							name="feedShedTime" options="00->12 AM~*1->01 AM~*2->02 AM~*3->03 AM~*4->04 AM~*5->05 AM~*6->06 AM~*7->07 AM~*8->08 AM~*9->09 AM~*10->10 AM~*11->11 AM~*12->12 PM~*13->01 PM~*14->02 PM~*15->03 PM~*16->04 PM~*17->05 PM~*18->06 PM~*19->07  PM~*20->08 PM~*21->09 PM~*22->10 PM~*23->11 PM" validate="required" 
						error="{$language.errFScheduleRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedTimezone}
				</div>
				<!--End:Left-->
				<div class="rightside01">
					{form->select tabindex="10" options=$resListTimezone name="timeZoneDetail" caption="->Select" value="{$datafeed->getTimeZone()}" validate="required" 
						error="{$language.errTimezoneRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedURL}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedURL" 
						class="textbox" 
						tabindex="11" value="{$datafeed->getFetchUrl()}"
						validate="required" 
						error="{$language.errFeedURLRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  
			  <li class="clearfix">
				<div class="leftside01">
					{$language.lblFeedUsername}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedUsername" 
						class="textbox" 
						tabindex="12" value="{$datafeed->getUsername()}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01">
					{$language.lblFeedPassword}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedPassword" 
						class="textbox" 
						tabindex="13" value="{$datafeed->getPassword()}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				{form->hidden
						name="feedID" 
						class="textbox" 
						tabindex="11" value="{$feedID}"
						}
				<!--End:right-->
			  </li> 
			{else}
			<li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblDataFeedTitle}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedTitile" 
						class="textbox" 
						tabindex="1"
						validate="required" 
						error="{$language.errFeedTitleRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			 <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedType}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->select 
							tabindex="2"
							name="feedType"   options="products->{$language.lblFeedProducts}" validate="required" 
						error="{$language.errFeedTypeRequired}"} 
				</div>
				<!--End:right-->
			  </li> 
			 <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblTargetCountry}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
                  {form->select tabindex="3" options=$resCountry name="countryIsoA2" caption="->Select" validate="required" 
						error="{$language.errCountryRequired}"}					
				</div>
				<!--End:right-->
			  </li> 
			 
			 <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedAttrLn}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedAttrLn" 
						class="textbox" 
						tabindex="4"
						value="en" 
						validate="required" 
						error="{$language.errAttrLnRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedContLn}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedContLn" 
						class="textbox" 
						tabindex="5"
						value="en" 
						validate="required" 
						error="{$language.errContLnRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedSched}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->select 
							caption="->{$language.lblSelect}" class="select-small" 
							tabindex="6"
							name="feedShed"   options="Monthly->{$language.lblFeedMonthly}~*Weekly->{$language.lblFeedWeekly}~*Daily->{$language.lblFeedDaily}" validate="required" 
						error="{$language.errFScheduleRequired}"} 
					{form->select 
							caption="->{$language.lblSelect}" class="select-small"
							tabindex="7"
							name="feedShedDate" options="01->01~*02->02~*03->03~*04->04~*05->05~*06->06~*07->07~*08->08~*09->09~*10->10~*11->11~*12->12~*13->13~*14->14~*15->15~*16->16~*17->17~*18->18~*19->19~*20->20~*21->21~*22->22~*23->23~*24->24~*25->25~*26->26~*27->27~*28->28~*29->29~*30->30" validate="feedShed->isEqual->Monthly~*required" 
						error="{$language.errFScheduleRequired}"} 
					{form->select 
							caption="->{$language.lblSelect}" class="select-small"
							tabindex="8"
							name="feedShedDay" options="sunday->sunday~*monday->monday~*tuesday->tuesday~*wednesday->wednesday~*thursday->thursday~*friday->friday~*saturday->saturday" validate="feedShed->isEqual->Weekly~*required" 
						error="{$language.errFScheduleRequired}"}
					{form->select 
							caption="->{$language.lblSelect}" class="select-small"
							tabindex="9"
							name="feedShedTime" options="00->12 AM~*1->01 AM~*2->02 AM~*3->03 AM~*4->04 AM~*5->05 AM~*6->06 AM~*7->07 AM~*8->08 AM~*9->09 AM~*10->10 AM~*11->11 AM~*12->12 PM~*13->01 PM~*14->02 PM~*15->03 PM~*16->04 PM~*17->05 PM~*18->06 PM~*19->07  PM~*20->08 PM~*21->09 PM~*22->10 PM~*23->11 PM" validate="required" 
						error="{$language.errFScheduleRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedTimezone}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->select tabindex="10" options=$resListTimezone name="timeZoneDetail" caption="->Select" validate="required" 
						error="{$language.errTimezoneRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01 mandatory">
					{$language.lblFeedURL}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedURL" 
						class="textbox" 
						tabindex="11"
						value="{$globalUrl}" 
						validate="required" 
						error="{$language.errFeedURLRequired}"} 
				</div>
				<!--End:right-->
			  </li>
			  
			  <li class="clearfix">
				<div class="leftside01">
					{$language.lblFeedUsername}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedUsername" 
						class="textbox" 
						tabindex="12"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				<div class="leftside01">
					{$language.lblFeedPassword}
				</div>
				<!--End:Left-->
				<div class="rightside01"> 
					{form->textbox
						name="feedPassword" 
						class="textbox" 
						tabindex="13"} 
				</div>
				<!--End:right-->
			  </li>
			  <li class="clearfix">
				
				<!--End:right-->
			  </li> 
			  {/if}
					</ul>
					</div>
				</div>
				<!--End:right-->
		  </div>
          
		  <!--End:From Listing--> 
		</div>
        </div>
         
        </div>
        
		<!--End:Border 3--> 
	  </div>
	  <!--End:Border 2--> 
	  {form->close} 
	  </div>
	<!--End: left Block-->
	<div class="clear"></div>
  </div>
  <!--End: left Block-->
  <div class="clear"></div>
</div>
<!--*********************************************END CONTAINER SECTION******************************************************--> 
<!--End:Content Container--> 
{include file='CommonBottom.tpl'}
</div>
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'} 
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
{form->basepath_script}
{form->validate_script form='formFeed'}
{html->messages_script id="common_message"}

<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script>
<script type="text/javascript">
	{literal}
	$(function(){
		 $('#perioddiv input').customInput('');
	});	
	{/literal}
	var preFillCategory ="";
	var lblSelect ="{$language.lblSelect}";
	$(document).ready(function () {
	$(document).on("click","ul.left-tab>li>a",function () {
        $("ul.left-tab>li>a").removeClass("active");
        $(this).addClass("active");
		var thisIndex = $("ul.left-tab>li>a").index(this);
        $(".tabpane").hide();
        $(".tabpane:eq(" + thisIndex + ")").show();
		setActiveTabSaveButton();
		});
setActiveTabSaveButton();
});
function setActiveTabSaveButton()
{
	var thisRel =   $(".left-tab li a.active").attr("rel");
	var cmButtonsFloating = $("#"+thisRel+"-section").children(".cm-buttons-floating");
	var cmButtons = $("#"+thisRel+"-section").children(".cm-buttons");
	$.scrollPane({
			floating: cmButtonsFloating,
			fixed: cmButtons,
			padding: 71
			});
	$.fn.hasScrollBar = function()
	{
		var thisRel =   $(".left-tab li a.active").attr("rel");
		toggleSaveButton(thisRel);
	}
	var thisRel =   $(".left-tab li a.active").attr("rel");
	toggleSaveButton(thisRel);
}
function toggleSaveButton(thisRel)
{
	$(".save-floating-section").hide();
	$("#"+thisRel+"-section").show();
}
</script>

<script type="text/javascript" src="{$view_javascript}/feedadd.page.js"></script> 

</body>
</html>
