<?php

/* default/template/extension/module/xtensions/checkout/address_form.twig */
class __TwigTemplate_cf28ee5b21b4bcaf56dc2c0bdf71b3cf4a5958f0d4c1453baf03e85400b4dfba extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        if ((isset($context["address_modal"]) ? $context["address_modal"] : null)) {
            // line 2
            echo "<div id=\"addressModal";
            echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("_edit") : (""));
            echo "\" class=\"modal fixed xmargin\"  tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">
  <div class=\"modal-dialog\">
    <div class=\"modal-content\">    
      <div class=\"modal-header\">
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>
        <h4 class=\"modal-title\">";
            // line 7
            echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ((isset($context["text_edit_address_heading"]) ? $context["text_edit_address_heading"] : null)) : ((isset($context["text_new_address_heading"]) ? $context["text_new_address_heading"] : null)));
            echo "</h4>
      </div>
      <div class=\"modal-body\">
";
        }
        // line 10
        echo "      
    \t<div id=\"";
        // line 11
        echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("editLoader") : ("addLoader"));
        echo "\" class=\"loader\"></div>    
          <form id=\"";
        // line 12
        echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("form_edit_address") : ("form_add_address"));
        echo "\" role=\"form\" action=\"#\" autocomplete=\"off\" method=\"post\" novalidate enctype=\"multipart/form-data\">
          \t";
        // line 13
        if ( !(isset($context["address_modal"]) ? $context["address_modal"] : null)) {
            // line 14
            echo "          \t<h3 class=\"address_title\">";
            echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ((isset($context["text_edit_address_heading"]) ? $context["text_edit_address_heading"] : null)) : ((isset($context["text_new_address_heading"]) ? $context["text_new_address_heading"] : null)));
            echo "</h3>
          \t";
        }
        // line 15
        echo "          
            <fieldset id=\"address_fields";
        // line 16
        echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("_edit") : (""));
        echo "\">
            ";
        // line 17
        if ((isset($context["is_edit"]) ? $context["is_edit"] : null)) {
            // line 18
            echo "            <input type=\"hidden\" name=\"address_id\" value=\"";
            echo $this->getAttribute((isset($context["address"]) ? $context["address"] : null), "address_id", array());
            echo "\" />
            ";
        }
        // line 20
        echo "            ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["fields"]) ? $context["fields"] : null), "checkout", array()));
        foreach ($context['_seq'] as $context["_key"] => $context["html"]) {
            // line 21
            echo "          \t\t";
            echo $context["html"];
            echo "
          \t ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['html'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 23
        echo "                 
    \t  ";
        // line 24
        if ((((isset($context["addresses"]) ? $context["addresses"] : null) &&  !(isset($context["is_edit"]) ? $context["is_edit"] : null)) || ((isset($context["is_edit"]) ? $context["is_edit"] : null) &&  !(isset($context["default"]) ? $context["default"] : null)))) {
            // line 25
            echo "    \t  <div class=\"form-group\">
    \t  <div class=\"checkbox_options\">
    \t  <label for=\"default_checkbox";
            // line 27
            echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("_edit") : (""));
            echo "\" class=\"pointer checkbox is_checkbox\">
    \t  <input type=\"checkbox\" class=\"input-checkbox\" id=\"default_checkbox";
            // line 28
            echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("_edit") : (""));
            echo "\" name=\"default\" value=\"1\" ><span>";
            echo (isset($context["entry_default"]) ? $context["entry_default"] : null);
            echo "</span></label>          
          </div>
          </div>
           ";
        } else {
            // line 32
            echo "            <input type=\"hidden\" name=\"default\" value=\"1\" />
      \t   ";
        }
        // line 33
        echo "          
        \t<div class=\"";
        // line 34
        echo (((isset($context["addresses"]) ? $context["addresses"] : null)) ? ("group-half group-left group") : (""));
        echo "\">
        \t<div class=\"buttons\">
         \t\t\t<input type=\"submit\" value=\"";
        // line 36
        echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ((isset($context["text_save"]) ? $context["text_save"] : null)) : ((((isset($context["addresses"]) ? $context["addresses"] : null)) ? ((isset($context["text_save"]) ? $context["text_save"] : null)) : ((isset($context["button_continue"]) ? $context["button_continue"] : null)))));
        echo "\" id=\"";
        echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("editAdress") : ("addAdress"));
        echo "\" data-loading-text=\"Loading...\" class=\"btn btn-success width100\" />
\t\t\t\t</div>     \t
\t\t\t</div> \t\t\t
\t\t\t";
        // line 39
        if ((isset($context["addresses"]) ? $context["addresses"] : null)) {
            // line 40
            echo "        \t<div class=\"group-half group-right group\">
        \t<div class=\"progress progress-continue-disabled\">
        \t\t";
            // line 42
            if ((isset($context["address_modal"]) ? $context["address_modal"] : null)) {
                // line 43
                echo "                    <div data-dismiss=\"modal\" class=\"progress-bar\" role=\"progressbar\" id=\"cancelAddress\" aria-valuenow=\"45\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 100%\">
                     <span>";
                // line 44
                echo (isset($context["text_cancel"]) ? $context["text_cancel"] : null);
                echo "</span>
                    </div>
                    ";
            } else {
                // line 47
                echo "                    <div onclick=\"toggleElement('#existingAddressPanel, ";
                echo (((isset($context["is_edit"]) ? $context["is_edit"] : null)) ? ("#editAddressFields") : ("#addressfields"));
                echo "');\$('.col-md-3.lborder').removeClass('xblur');\" class=\"progress-bar\" role=\"progressbar\" id=\"cancelAddress\" aria-valuenow=\"45\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 100%\">
                     <span>";
                // line 48
                echo (isset($context["text_cancel"]) ? $context["text_cancel"] : null);
                echo "</span>
                    </div>                      
                    ";
            }
            // line 50
            echo "                     
                  </div>
\t\t\t</div> \t\t\t
\t\t\t ";
        }
        // line 54
        echo "            </fieldset>
          </form>
";
        // line 56
        if ((isset($context["address_modal"]) ? $context["address_modal"] : null)) {
            echo "          
      </div>     
    </div>
  </div>
</div>
";
        }
        // line 62
        if ((isset($context["is_edit"]) ? $context["is_edit"] : null)) {
            echo "  
 ";
            // line 63
            if ((isset($context["mask"]) ? $context["mask"] : null)) {
                echo "  
<script type=\"text/javascript\" src=\"catalog/view/javascript/xtensions/stylesheet/bs/js/jquery.maskedinput.min.js\"></script>
<script type=\"text/javascript\">
 jQuery(function(\$){
 ";
                // line 67
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable((isset($context["mask"]) ? $context["mask"] : null));
                foreach ($context['_seq'] as $context["key"] => $context["value"]) {
                    echo "\t      
 \$(\"#address_fields_edit #";
                    // line 68
                    echo $context["key"];
                    echo "\").mask(\"";
                    echo $context["value"];
                    echo "\");\t      
 ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 70
                echo " });
 </script>
";
            }
            // line 73
            echo "<script type=\"text/javascript\" src=\"catalog/view/javascript/xtensions/stylesheet/bs/js/xcustom.js\"></script> 
 <script type=\"text/javascript\">
 \$(function () {
     \$('[data-toggle=\"tooltip\"]').tooltip();
 });
\$('.date').datetimepicker({
\tlanguage: '";
            // line 79
            echo (isset($context["datepicker"]) ? $context["datepicker"] : null);
            echo "',
\tpickTime: false
});
\$('.time').datetimepicker({
\tlanguage: '";
            // line 83
            echo (isset($context["datepicker"]) ? $context["datepicker"] : null);
            echo "',
\tpickDate: false
});
\$('.datetime').datetimepicker({
\tlanguage: '";
            // line 87
            echo (isset($context["datepicker"]) ? $context["datepicker"] : null);
            echo "',
\tpickDate: true,
\tpickTime: true
});
\$('#address_fields_edit ";
            // line 91
            echo (((isset($context["display_country"]) ? $context["display_country"] : null)) ? ("select") : ("input"));
            echo "[name=\\'country_id\\']').bind('change', function() {
\tloadZone(";
            // line 92
            echo (((((("'address_fields_edit',this.value,'" . (isset($context["zone_id"]) ? $context["zone_id"] : null)) . "','") . (isset($context["text_select"]) ? $context["text_select"] : null)) . "','") . (isset($context["text_none"]) ? $context["text_none"] : null)) . "'");
            echo ");\t
});
\$('#address_fields_edit ";
            // line 94
            echo (((isset($context["display_country"]) ? $context["display_country"] : null)) ? ("select") : ("input"));
            echo "[name=\\'country_id\\']').trigger('change');
\t
</script>
";
        } else {
            // line 98
            echo "<script type=\"text/javascript\">
\$('#address_fields ";
            // line 99
            echo (((isset($context["display_country"]) ? $context["display_country"] : null)) ? ("select") : ("input"));
            echo "[name=\\'country_id\\']').bind('change', function() {
\tloadZone(";
            // line 100
            echo (((((("'address_fields',this.value,'" . (isset($context["zone_id"]) ? $context["zone_id"] : null)) . "','") . (isset($context["text_select"]) ? $context["text_select"] : null)) . "','") . (isset($context["text_none"]) ? $context["text_none"] : null)) . "'");
            echo ");\t
});
\t\$('#address_fields ";
            // line 102
            echo (((isset($context["display_country"]) ? $context["display_country"] : null)) ? ("select") : ("input"));
            echo "[name=\\'country_id\\']').trigger('change');
 </script>
 ";
        }
        // line 104
        echo "\t ";
    }

    public function getTemplateName()
    {
        return "default/template/extension/module/xtensions/checkout/address_form.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  269 => 104,  263 => 102,  258 => 100,  254 => 99,  251 => 98,  244 => 94,  239 => 92,  235 => 91,  228 => 87,  221 => 83,  214 => 79,  206 => 73,  201 => 70,  191 => 68,  185 => 67,  178 => 63,  174 => 62,  165 => 56,  161 => 54,  155 => 50,  149 => 48,  144 => 47,  138 => 44,  135 => 43,  133 => 42,  129 => 40,  127 => 39,  119 => 36,  114 => 34,  111 => 33,  107 => 32,  98 => 28,  94 => 27,  90 => 25,  88 => 24,  85 => 23,  76 => 21,  71 => 20,  65 => 18,  63 => 17,  59 => 16,  56 => 15,  50 => 14,  48 => 13,  44 => 12,  40 => 11,  37 => 10,  30 => 7,  21 => 2,  19 => 1,);
    }
}
/* {% if  address_modal %}*/
/* <div id="addressModal{{ is_edit?'_edit': '' }}" class="modal fixed xmargin"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">*/
/*   <div class="modal-dialog">*/
/*     <div class="modal-content">    */
/*       <div class="modal-header">*/
/*         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>*/
/*         <h4 class="modal-title">{{ is_edit?text_edit_address_heading:text_new_address_heading }}</h4>*/
/*       </div>*/
/*       <div class="modal-body">*/
/* {% endif %}      */
/*     	<div id="{{ is_edit?'editLoader':'addLoader' }}" class="loader"></div>    */
/*           <form id="{{ is_edit?'form_edit_address':'form_add_address' }}" role="form" action="#" autocomplete="off" method="post" novalidate enctype="multipart/form-data">*/
/*           	{% if not address_modal%}*/
/*           	<h3 class="address_title">{{ is_edit?text_edit_address_heading:text_new_address_heading }}</h3>*/
/*           	{% endif %}          */
/*             <fieldset id="address_fields{{ is_edit?'_edit':'' }}">*/
/*             {% if is_edit%}*/
/*             <input type="hidden" name="address_id" value="{{ address.address_id }}" />*/
/*             {% endif %}*/
/*             {% for html in fields.checkout %}*/
/*           		{{ html }}*/
/*           	 {% endfor %}*/
/*                  */
/*     	  {% if addresses  and  not is_edit  or  is_edit  and  not default%}*/
/*     	  <div class="form-group">*/
/*     	  <div class="checkbox_options">*/
/*     	  <label for="default_checkbox{{ is_edit?'_edit': ''}}" class="pointer checkbox is_checkbox">*/
/*     	  <input type="checkbox" class="input-checkbox" id="default_checkbox{{ is_edit?'_edit': ''}}" name="default" value="1" ><span>{{ entry_default }}</span></label>          */
/*           </div>*/
/*           </div>*/
/*            {% else %}*/
/*             <input type="hidden" name="default" value="1" />*/
/*       	   {% endif %}          */
/*         	<div class="{{ addresses?'group-half group-left group':'' }}">*/
/*         	<div class="buttons">*/
/*          			<input type="submit" value="{{ is_edit?text_save:addresses?text_save:button_continue }}" id="{{ is_edit?'editAdress':'addAdress' }}" data-loading-text="Loading..." class="btn btn-success width100" />*/
/* 				</div>     	*/
/* 			</div> 			*/
/* 			{% if addresses %}*/
/*         	<div class="group-half group-right group">*/
/*         	<div class="progress progress-continue-disabled">*/
/*         		{% if address_modal%}*/
/*                     <div data-dismiss="modal" class="progress-bar" role="progressbar" id="cancelAddress" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 100%">*/
/*                      <span>{{ text_cancel }}</span>*/
/*                     </div>*/
/*                     {% else %}*/
/*                     <div onclick="toggleElement('#existingAddressPanel, {{ is_edit?'#editAddressFields':'#addressfields' }}');$('.col-md-3.lborder').removeClass('xblur');" class="progress-bar" role="progressbar" id="cancelAddress" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 100%">*/
/*                      <span>{{ text_cancel }}</span>*/
/*                     </div>                      */
/*                     {% endif %}                     */
/*                   </div>*/
/* 			</div> 			*/
/* 			 {% endif %}*/
/*             </fieldset>*/
/*           </form>*/
/* {% if address_modal%}          */
/*       </div>     */
/*     </div>*/
/*   </div>*/
/* </div>*/
/* {% endif %}*/
/* {% if is_edit %}  */
/*  {% if mask %}  */
/* <script type="text/javascript" src="catalog/view/javascript/xtensions/stylesheet/bs/js/jquery.maskedinput.min.js"></script>*/
/* <script type="text/javascript">*/
/*  jQuery(function($){*/
/*  {% for key, value in mask %}	      */
/*  $("#address_fields_edit #{{ key }}").mask("{{ value }}");	      */
/*  {% endfor %}*/
/*  });*/
/*  </script>*/
/* {% endif %}*/
/* <script type="text/javascript" src="catalog/view/javascript/xtensions/stylesheet/bs/js/xcustom.js"></script> */
/*  <script type="text/javascript">*/
/*  $(function () {*/
/*      $('[data-toggle="tooltip"]').tooltip();*/
/*  });*/
/* $('.date').datetimepicker({*/
/* 	language: '{{ datepicker }}',*/
/* 	pickTime: false*/
/* });*/
/* $('.time').datetimepicker({*/
/* 	language: '{{ datepicker }}',*/
/* 	pickDate: false*/
/* });*/
/* $('.datetime').datetimepicker({*/
/* 	language: '{{ datepicker }}',*/
/* 	pickDate: true,*/
/* 	pickTime: true*/
/* });*/
/* $('#address_fields_edit {{display_country?'select': 'input'}}[name=\'country_id\']').bind('change', function() {*/
/* 	loadZone({{ "'address_fields_edit',this.value,'"~zone_id~"','"~text_select~"','"~text_none ~"'" }});	*/
/* });*/
/* $('#address_fields_edit {{display_country?'select': 'input'}}[name=\'country_id\']').trigger('change');*/
/* 	*/
/* </script>*/
/* {% else %}*/
/* <script type="text/javascript">*/
/* $('#address_fields {{display_country?'select': 'input'}}[name=\'country_id\']').bind('change', function() {*/
/* 	loadZone({{ "'address_fields',this.value,'"~zone_id~"','"~text_select~"','"~text_none ~"'" }});	*/
/* });*/
/* 	$('#address_fields {{display_country?'select': 'input'}}[name=\'country_id\']').trigger('change');*/
/*  </script>*/
/*  {% endif %}	 */
