<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js" ng-app="myapp">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$language.lblAccountinfo} : {$commonMetaTitle}</title>
    <meta name="viewport" content="width=device-width">
    <meta name="Description" content="{$commonMetaDescription}"/>
    <meta name="Keywords" content="{$commonMetaKeywords}"/>
    {include file='CommonStyles.tpl'}
    <link href="{$view_styles}/myaccount.css" rel="stylesheet" type="text/css" media="screen" />
    {include file='CommonJavaScript.tpl'}
    {form->rootpath_script}
    {form->basepath_script}
    <script type="text/javascript">
      var lblSave="{$language.lblSave}";
      var lblUpdate="{$language.lblUpdate}";
    </script>
  </head>
  <body ng-controller="SearchCtrl"> 
      {*<!-- Begin : Outer Pane -->*}
    <div id="main" class="outer">
      {*<!-- Begin : Header Pane--> *}
      {include file='CommonTop.tpl'} 
      {*<!-- End : Header -->*}
      <div id="content-wrapper" ng-show="!query">
          <h4 class="side-head bg-primary padding text-center">{html->anchor href="user/accounts" caption="{$language.lblBack}" class="light pull-left back  icon-arrow-left"}{$language.lblShippingAccount}</h4>
        <div class="container">
           <div class="right-panel light-bg margin-top"> 
            <div id="common_message" ></div>
            {*<!-- Begin : Gift Block -->*}
            <div class="clearfix">
              {*<!-- Begin : Content Pane -->*}
              <ul class="multiple-address margin-top">
                <script>
                  var address={};
                </script> 
                {assign var="radioCounter" value="1"}
                {foreach $resShippingAddress as $shippingAddress}
                <li class="margin-bottom pos-rel">
                  <script>
                    address[{$shippingAddress.userShippingID}]={$shippingAddress|json_encode};
                  </script>
                  <div class="add-list">
                    <div class="pull-right list-icons"> {html->anchor rel=$shippingAddress.userShippingID class=" icon-waste" confirm_head=$language.lblDelete  title="{$language.lblDelete}" confirm="{$language.msgConfirmDelete}" href="user/deleteAddress/shippingID/{$shippingAddress.userShippingID}"}
                      {html->anchor rel=$shippingAddress.userShippingID  class="icon-edit-fill editAddress" title="{$language.lblEdit}"  href=""} 
                    </div>
                    {assign var="address" value=$shippingAddress.shippingFname|cat:"~*"|cat:$shippingAddress.shippingLname|cat:"~*"|cat:$shippingAddress.shippingAddress1|cat:"~*"|cat:$shippingAddress.shippingAddress2|cat:"~*"|cat:$shippingAddress.shippingCity|cat:"~*"|cat:$shippingAddress.shippingZip|cat:"~*"|cat:$shippingAddress.shippingStateID|cat:"~*"|cat:$shippingAddress.shippingCountryID}
                    {if $shippingAddress.addressPrimary=='Yes'} 
                    {form->radio class="makePrimaryRadio" id="makePrimaryRadio_{$radioCounter}" checked="checked" name="makePrimaryRadio" value="shippingAddress"}
                    <label for="makePrimaryRadio_{$radioCounter}">{$address|address_format:"":', '}</label>
                    {else} 
                    {form->radio class="makePrimaryRadio" id="makePrimaryRadio_{$radioCounter}" name="makePrimaryRadio" value="shippingAddress"}
                    <label for="makePrimaryRadio_{$radioCounter}">{$address|address_format:"":', '}</label>
                    {/if}
                  </div>
                  <div class="editForm"></div>
                </li>
                {assign var="radioCounter" value=$radioCounter+1}
                {/foreach}
              </ul>
              {html->anchor class="btn btn-primary btn-sm hidden-xs addnewAddress"  caption="{$language.lblAddNewAddress}" href=""}
              {html->anchor class="btn btn-primary btn-block visible-xs addnewAddress"  caption="{$language.lblAddNewAddress}" href=""}
              <div class="addnewAddressFormNew"></div>
              <div class="addnewAddressForm hide" id="scrollDiv">
                {form->start name="formUserShippingEdit" class='active' method="post" enctype="multipart/form-data"}            
                {form->hidden name="shippingcityhidValue"}           
                {form->hidden name="userShippingID"}           
                {form->hidden name="referralID"}           
                {form->hidden name="userID"}           
                {form->hidden name="removeIcon"  id="removeIcon" value="$view_images/remove.gif"}
                <div class="clearfix">
                  <fieldset class="margin-top">
                    <h3>{$language.lblShippinginfo}</h3>
                    <div class="row">
                        <div class="clearfix">
                    <div class=" form-group col-xs-12 col-sm-6">
                        <label>{$language.lblFirstName} <span class="mndty">*</span></label>
                        <div class="field"> {form->textbox  name="shippingFname" validate_event="submit" maxlength="50"  tabindex="1"  class="form-control" validate="required" error=$language.errFirstName} </div>
                      </div>
                      <div class=" form-group col-xs-12 col-sm-6">
                        <label>{$language.lblLastName} <span class="mndty">*</span></label>
                        <div class="field"> {form->textbox validate_event="submit"  class="form-control " maxlength="50"   tabindex="1" name="shippingLname" validate="required" error=$language.errLastName} </div>
                    </div>
                        </div>
                        <div class="clearfix">
                    <div class="form-group col-xs-12 col-sm-6">
                        <label> {$language.lblAddress1} <span class="mndty">*</span></label>
                        <div class="field"> {form->textbox validate_event="submit" tabindex="1" class="form-control" maxlength="100" name="shippingAddress1" validate="required" error=$language.errAddress1} </div>
                      </div>
                      <div class=" form-group col-xs-12 col-sm-6">
                        <label> {$language.lblAddress2} </label>
                        <div class="field"> {form->textbox  tabindex="1"  class="form-control" maxlength="100" name="shippingAddress2"} </div>
                      </div>
                        </div>
                        <div class="clearfix">
                      <div class=" form-group col-xs-12 col-sm-6">
                        <label> {$language.lblCountry} <span class="mndty">*</span></label>
                        <div class="field"> {*form->hidden name="shippingcountryID" value=$shippingCountryID*}
                          {form->select tabindex="1" validate_event="submit" options=$resCountry class="form-control"  onchange="listshippingCities(this.value,'');" name="shippingCountryID" caption="->Select" validate="required" error=$language.errCountry} 
                        </div>
                    </div>
                    <div class="form-group col-xs-12 col-sm-6">
                        <label> {$language.lblCity} <span class="mndty">*</span></label>
                        <div class="field">  <div id="shippingcityInput" class="hide"> {assign var="class" value="choosen"}{form->select tabindex="1" value=$shippingCity|default:'' class="{$class} form-control" validate_event="submit" name="shippingCity" options="->Select" validate="shippingCitySelectedType->isequal->city~*required" error=$language.errBusCity onchange="getshippingCityHiddenValue(this.value,'');"} </div><div id="shippingcityProvinceInput">{form->textbox validate_event="submit" value=$shippingProvince|default:'' name="shippingProvince"  tabindex="1"  maxlength="70" class="form-control" validate="shippingCitySelectedType->isequal->province~*shippingProvince->required"  error=$language.errProvince} </div> <span id="loadProcessImage1"></span> </div>
                      </div>
                        </div>
                        <div class="clearfix">
                      <div class=" form-group col-xs-12 col-sm-6">
                        <label> {$language.lblZipPostalCode} <span class="mndty">*</span></label>
                        <div class="field"> {form->textbox validate_event="submit" tabindex="1" class="form-control" maxlength="10" name="shippingZip" validate="required" error=$language.errZipCode} </div>
                    </div>
                    <div class="form-group col-xs-12 col-sm-6">
                        <p class="primaryCheck"> 
                          {form->checkbox  tabindex="1" value='Yes'  name="makeAddressAsPrimary"} 
                          <label for="makeAddressAsPrimary">{$language.lblMakeAsPrimary}</label> 
                        </p>
                        {form->hidden name="userStatus"} 
                        <div class="col-xs-6">
                        {form->submit tabindex="1" name="submit" id="submit" class="btn btn-primary btn-block" form="formUserShippingEdit" value="{$language.lblSubmit}"}</div>         
                        <div class="col-xs-6">
                        {html->anchor caption="{$language.lblCancel}" href="" class="formAddCancel btn btn-default btn-block"}
                        </div>
                    </div>
                        </div>
                    </div>
                  </fieldset>
                </div>
                {form->hidden name="count" value=1 id="count"}       
                {form->hidden name="selectedCities"  id="selectedCities" value=$selectedCities|default:''}            
                {form->close} 
                {form->validate_script form="formUserShippingEdit"}
              </div>
              {*<!-- End : Content Pane -->*}
            </div>
            {*<!-- End : Gift Block --> *}
            </div>
        </div>
      </div>
      {*<!-- End : Content Pane -->*} 
      {*<!-- Begin : Footer	Pane --> *}
      {include file='CommonBottom.tpl'} 
      {*<!-- End : Footer Pane -->*} 
    </div>
    {include file='CommonJavaScriptBottom.tpl'} 
      {*<!-- End : Outer Pane -->*} 
    {html->messages_script id="common_message"}
	{html->script src="{$common_js}/chosen.pluggin.js"}
    {html->script_group_start name="{$compiled_js_path}/account.shippingaccount.js"}
       {html->script src="{$common_frontend_js}/shipping.page.js"}
    {html->script_group_end} 
  </body>
</html>