<!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} : {if $broucherID|default:"">0}  {$language.lblBroucherEdit}  {else} {$language.lblBroucherAddNew} {/if}</title>
{include file="CommonStyles.tpl"}
{include file="CommonCustomStyles.tpl"}
{include file="CommonJavaScript.tpl"}
<link rel="stylesheet" type="text/css" href="{$view_styles}/form_listing.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/inner-formlisting.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/right-menu.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" />
</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"> 
          {html->anchor priv_href="broucher/new/" href="broucher/new/" class="custom-btnt" content="<span class='plus-v'></span><span class='plus-h'></span><strong><span class='add'></span>{$language.lblBroucherAddNew} </strong>" title="{$language.lblBroucherList}"}
          <ul>
                <li>
                        {html->anchor priv_href="broucher/index/" href="/broucher/index/"  class="side_menu_a selected" content="{$language.lblManageBrouchers}<br /><span>{$language.lblManageBrouchers}</span>"} 

                </li>

        </ul>
          </div>
        </div>
        <!--End: Right Block-->
        <div class="left_wrapper">
        {form->start name="formBroucher" action="" method="post"}
        {form->hidden name="broucherID" value="{$broucherID}"}
        
          <div class="content_wrapper">
              {if isset($broucherID) && $broucherID>0}
                <div class="fixing_right">
                     {if $broucherID>0 && $availableLang|default:'' neq 0}
                 {include file='ContentLanguageOptions.tpl'}
                {/if} 
                </div>
                {/if}
                <h2>
                {if isset($broucherID) && $broucherID>0}
                        {$language.lblBroucherEdit}
                {else}		
                        {$language.lblBroucherAddNew} 
                {/if}
                </h2>
                <div class="inner_content_wrapper">
                <div id="common_message"></div>
                  <div class="form_listing form_listing03">
                        <ul>
			<li class="clearfix">
					<div class="leftside01 mandatory">
							{$language.lblSeries}
					</div>
					<!--End:Left-->
					<div class="rightside01"> 
							{form->select style="width:45%;" tabindex="1" class="select" name="productCategoryID"  caption="->{$language.lblSelect}" options=$resProductCategories validate="required" error=$language.errSeries}
					</div>
					<!--End:right-->
			  </li>
			<li class="clearfix">
					<div class="leftside01 mandatory">
							{$language.lblModel}
					</div>
					<!--End:Left-->
					<div class="rightside01"> 
					{form->select style="width:45%;" tabindex="2" class="select" name="bodyStyle"  caption="->{$language.lblSelect}" validate="required" error=$language.errBodyType}
					</div>
					<!--End:right-->
			  </li>
							 
		   
			<li class="clearfix">
					<div class="leftside01 mandatory">
							{$language.lblBroucherLink}
					</div>
					<!--End:Left-->
					<div class="rightside01"> 
							{form->textbox
									name="broucherLink" 
									class="textbox" 
									tabindex="3" validate="required" error=$language.errBroucherLInk} 
					</div>
					<!--End:right-->
			  </li>
		   
		   
			  <li class="clearfix">
					<div class="leftside01 mandatory">
							{$language.lblBroucherstatus}
					</div>
					<!--End:Left-->
					<div class="rightside01"> 
							<div id="perioddiv">
							{form->radio 
									name="status"
									tabindex="4"									
									class="customradio"
									value="A"
									options="A->{$language.lblActive}~*I->{$language.lblInactive}" 
									} 
							</div>
					</div>
					<!--End:right-->
			  </li>
			  <li class="clearfix">
					<div class="submit-block clearfix"> 
									<span>  </span>
									<div class="leftside01"> </div>
									<div class="rightside01">	
									{form->submit 
											name="submitBroucher"
											tabindex="5"											
											class="curve-3" 
											value="{if isset($broucherID) && $broucherID>0}{$language.lblUpdate}{else}{$language.lblSave}{/if}"}
											{$language.lblOr}
											{html->anchor  href="broucher/index/" content="{$language.lblCancel}"}

									 </div>
							</div>
					<!--End:right-->
			  </li>
                        </ul>
                  </div>
                  <!--End:From Listing--> 
                </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='formBroucher'}
{html->messages_script id="common_message"}
<script type="text/javascript">
$(document).ready(function(){

var seriesval=$('#productCategoryID').val();
if(seriesval != ''){
				$.ajax({
					type: "POST",
					url: GLOBAL_BASE_PATH + "/broucher/ajaxGetBodytype/",
					data: 'category='+$(this).val(),
					success: function (data) 
					{          		
						  $( "#bodyStyle" ).html(data);
					}
				});
			}
			
});
$( function() {	   
		 $('#productCategoryID').change(function(){ 
			if($(this).val() != ''){
				$.ajax({
					type: "POST",
					url: GLOBAL_BASE_PATH + "/broucher/ajaxGetBodytype/",
					data: 'category='+$(this).val(),
					success: function (data) 
					{          		
						  $( "#bodyStyle" ).html(data);
					}
				});
			}
		});
		
  });
</script>
</body>
</html>