<?php

/* shippingzone.form.tpl */
class __TwigTemplate_3f0cee77cd13c441a030c3c9853057a9 extends Twig_Template
{
    public function display(array $context)
    {
        // line 1
        echo "<form action=\"index.php?ToDo=";
        echo twig_safe_filter((isset($context['FormAction']) ? $context['FormAction'] : null));
        echo twig_safe_filter((isset($context['VendorIdAdd']) ? $context['VendorIdAdd'] : null));
        echo "\" id=\"frmZone\" method=\"post\" onsubmit=\"return ValidateForm(CheckZoneForm)\" class=\"form-horizontal\">
\t<input type=\"hidden\" name=\"zoneId\" id=\"zoneId\" value=\"";
        // line 2
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "\" />
\t<input type=\"hidden\" name=\"currentTab\" value=\"";
        // line 3
        echo twig_safe_filter((isset($context['CurrentTab']) ? $context['CurrentTab'] : null));
        echo "\" id=\"currentTab\" />

\t<div class=\"row\">
\t\t<div class=\"col-sm-12\">
\t\t\t<h4 class=\"page-title\">";
        // line 7
        echo twig_safe_filter((isset($context['Title']) ? $context['Title'] : null));
        echo "</h4>
\t\t\t<p>";
        // line 8
        echo twig_safe_filter((isset($context['Intro']) ? $context['Intro'] : null));
        echo "</p>
\t\t\t";
        // line 9
        echo twig_safe_filter((isset($context['Message']) ? $context['Message'] : null));
        echo "
\t\t</div>
\t</div>


\t<div class=\"row\">
\t\t<div class=\"col-sm-12\">
\t\t\t<ul id=\"tabnav\" class=\"nav nav-tabs tabs ui-tabs ui-widget ui-widget-content ui-corner-all\" style=\"margin-bottom: 20px;\">
\t\t\t\t<li class=\"tab\"><a href=\"#\" class=\"active\" id=\"tab0\" onclick=\"ShowTab(0)\">";
        // line 17
        echo getLang("ZoneSettings");
        echo "</a></li>
\t\t\t\t<li class=\"tab\"><a href=\"#\" id=\"tab1\" style=\"";
        // line 18
        echo twig_safe_filter((isset($context['HideShippingMethods']) ? $context['HideShippingMethods'] : null));
        echo "\" onclick=\"ShowTab(1)\">";
        echo getLang("ShippingMethods");
        echo "</a></li>
\t\t\t\t<br class=\"Clear\" />
\t\t\t</ul>
\t\t</div>
\t</div>

\t<div id=\"div0\">
\t\t<div class=\"panel panel-default\">
\t\t\t<div class=\"panel-heading\"> 
\t\t\t\t<h3 class=\"panel-title\">";
        // line 27
        echo getLang("ShippingZoneSettings");
        echo "</h3> 
\t\t\t</div> 

\t\t\t<div class=\"panel-body\">
\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 32
        echo getLang("ShippingZoneName");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"zonename\" id=\"zonename\" value=\"";
        // line 34
        echo twig_safe_filter((isset($context['ZoneName']) ? $context['ZoneName'] : null));
        echo "\" class=\"form-control\" />
\t\t\t\t\t</div>
\t\t\t\t</div>

\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 39
        echo getLang("ShippingZoneType");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<div style=\"";
        // line 41
        echo twig_safe_filter((isset($context['HideDefaultZoneType']) ? $context['HideDefaultZoneType'] : null));
        echo "\">
\t\t\t\t\t\t\t";
        // line 42
        echo getLang("ShippingZoneTypeGlobal");
        echo "\t\t\t\t\t\t</div>

\t\t\t\t\t\t<div id=\"ZoneTypeOptions\" style=\"";
        // line 45
        echo twig_safe_filter((isset($context['HideZoneTypeFields']) ? $context['HideZoneTypeFields'] : null));
        echo "\">
\t\t\t\t\t\t\t<label style=\"display: block;\">
\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zonetype\" id=\"zonetype_country\" onclick=\"ChangeZoneType(this.value)\" value=\"country\" ";
        // line 47
        echo twig_safe_filter((isset($context['TypeCountriesChecked']) ? $context['TypeCountriesChecked'] : null));
        echo " />
\t\t\t\t\t\t\t\t";
        // line 48
        echo getLang("ShippingZoneTypeCountry");
        echo "\t\t\t\t\t\t\t</label>

\t\t\t\t\t\t\t<div id=\"ZoneTypeCountry\" style=\"";
        // line 51
        echo twig_safe_filter((isset($context['HideZoneTypeCountry']) ? $context['HideZoneTypeCountry'] : null));
        echo "\">
\t\t\t\t\t\t\t\t<table>
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td style=\"vertical-align: top;\"><img src=\"images/nodejoin.gif\" alt=\"\" /></td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<select name=\"zonetype_country_list[]\" id=\"zonetype_country_list\" size=\"15\" multiple=\"multiple\" class=\"form-control ISSelectReplacement\">
\t\t\t\t\t\t\t\t\t\t\t\t";
        // line 57
        echo twig_safe_filter((isset($context['MultipleCountrySelect']) ? $context['MultipleCountrySelect'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t\t</div>

\t\t\t\t\t\t\t<label style=\"display: block;\">
\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zonetype\" id=\"zonetype_state\" onclick=\"ChangeZoneType(this.value)\" value=\"state\" ";
        // line 65
        echo twig_safe_filter((isset($context['TypeStatesChecked']) ? $context['TypeStatesChecked'] : null));
        echo " />
\t\t\t\t\t\t\t\t";
        // line 66
        echo getLang("ShippingZoneTypeState");
        echo "\t\t\t\t\t\t\t</label>

\t\t\t\t\t\t\t<div id=\"ZoneTypeStates\" style=\"";
        // line 69
        echo twig_safe_filter((isset($context['HideZoneTypeStates']) ? $context['HideZoneTypeStates'] : null));
        echo "\">
\t\t\t\t\t\t\t\t<table>
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td rowspan=\"2\" style=\"vertical-align: top;\"><img src=\"images/nodejoin.gif\" alt=\"\" /></td>
\t\t\t\t\t\t\t\t\t\t<td style=\"padding-top: 5px; vertical-align: top;\">";
        // line 73
        echo getLang("Countries");
        echo ":</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<select name=\"zonetype_states_country[]\" id=\"StateCountries\" size=\"10\" multiple=\"multiple\" class=\"form-control ISSelectReplacement\" onchange=\"UpdateZoneStateSelect(this)\">
\t\t\t\t\t\t\t\t\t\t\t\t";
        // line 76
        echo twig_safe_filter((isset($context['MultipleCountrySelect']) ? $context['MultipleCountrySelect'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td style=\"vertical-align: top;\">";
        // line 82
        echo getLang("States");
        echo ":</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<select name=\"zonetype_states[]\" size=\"10\" multiple=\"multiple\" class=\"form-control ISSelectReplacement\" id=\"StateSelect\" style=\"";
        // line 84
        echo twig_safe_filter((isset($context['HideStateSelect']) ? $context['HideStateSelect'] : null));
        echo "\">
\t\t\t\t\t\t\t\t\t\t\t\t";
        // line 85
        echo twig_safe_filter((isset($context['StateSelect']) ? $context['StateSelect'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t\t<div id=\"ZoneStateSelectNone\" style=\"font-size: 20px; background: #fff; border: 1px solid #7F9DB9; font-weight: bold; color: #aaa; text-align: center; ";
        // line 87
        echo twig_safe_filter((isset($context['HideStateSelectNone']) ? $context['HideStateSelectNone'] : null));
        echo "\"><div style=\"padding-top: 40px; \">";
        echo getLang("SelectOneOrMoreCountriesFirst");
        echo "</div></div>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t\t</div>

\t\t\t\t\t\t\t<label style=\"display: block;\">
\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"zonetype\" id=\"zonetype_zip\" onclick=\"ChangeZoneType(this.value)\" value=\"zip\" ";
        // line 94
        echo twig_safe_filter((isset($context['TypeZipChecked']) ? $context['TypeZipChecked'] : null));
        echo " />
\t\t\t\t\t\t\t\t";
        // line 95
        echo getLang("ShippingZoneTypeZip");
        echo "\t\t\t\t\t\t\t</label>

\t\t\t\t\t\t\t<div id=\"ZoneTypePostCodes\" style=\"";
        // line 98
        echo twig_safe_filter((isset($context['HideZoneTypePostCodes']) ? $context['HideZoneTypePostCodes'] : null));
        echo "\">
\t\t\t\t\t\t\t\t<table>
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td rowspan=\"2\" style=\"vertical-align: top;\"><img src=\"images/nodejoin.gif\" alt=\"\" /></td>
\t\t\t\t\t\t\t\t\t\t<td>";
        // line 102
        echo getLang("Country");
        echo ":</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<select name=\"zonetype_zip_country\" id=\"zonetype_zip_country\" class=\"form-control\">
\t\t\t\t\t\t\t\t\t\t\t\t";
        // line 105
        echo twig_safe_filter((isset($context['SingleCountrySelect']) ? $context['SingleCountrySelect'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td style=\"vertical-align: top;\">";
        // line 111
        echo getLang("ZipPostCodes");
        echo ":</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<textarea name=\"zonetype_zip_list\" id=\"zonetype_zip_list\" class=\"form-control\" rows=\"10\" cols=\"10\">";
        // line 113
        echo twig_safe_filter((isset($context['ZonePostCodes']) ? $context['ZonePostCodes'] : null));
        echo "</textarea><br />
\t\t\t\t\t\t\t\t\t\t\t";
        // line 114
        echo getLang("ZipPostCodesPerLine");
        echo "<br />
\t\t\t\t\t\t\t\t\t\t\t<a href='#' onclick='LaunchHelp(850); return false;' target=\"_blank\">";
        // line 115
        echo getLang("LearnMoreAboutEnteringPostCodes");
        echo "</a>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>

\t\t\t\t<div class=\"form-group\" style=\"";
        // line 124
        echo twig_safe_filter((isset($context['HideZoneEnabled']) ? $context['HideZoneEnabled'] : null));
        echo "\">
\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 125
        echo getLang("EnableShippingZone");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<div class=\"checkbox checkbox-primary\">
\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"zoneenabled\" id=\"zoneenabled\" ";
        // line 128
        echo twig_safe_filter((isset($context['ZoneEnabledCheck']) ? $context['ZoneEnabledCheck'] : null));
        echo " />
\t                        <label for=\"zoneenabled\">";
        // line 129
        echo getLang("YesEnableShippingZone");
        echo "</label>
\t                    </div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>

\t\t<div class=\"panel panel-default\">
\t\t\t<div class=\"panel-heading\"> 
\t\t\t\t<h3 class=\"panel-title\">";
        // line 138
        echo getLang("FreeShippingAndHandlingSettings");
        echo "</h3> 
\t\t\t</div> 

\t\t\t<div class=\"panel-body\">
\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 143
        echo getLang("EnableFreeShipping");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<div class=\"checkbox checkbox-primary\">
\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"zonefreeshipping\" id=\"zonefreeshipping\" value=\"1\" onclick=\"ToggleFreeShipping(this.checked)\" ";
        // line 146
        echo twig_safe_filter((isset($context['FreeShippingChecked']) ? $context['FreeShippingChecked'] : null));
        echo " />
\t                        <label for=\"zonefreeshipping\">";
        // line 147
        echo getLang("YesEnableFreeShipping");
        echo "</label>
\t                    </div>
\t\t\t\t\t\t
\t\t\t\t\t\t<div id=\"FreeShippingOptions\" style=\"";
        // line 150
        echo twig_safe_filter((isset($context['HideFreeShipping']) ? $context['HideFreeShipping'] : null));
        echo "\">
\t\t\t\t\t\t\t<div class=\"input-group m-t-10 col-sm-8\">
\t                        \t<span class=\"input-group-addon\">Total do pedido para qualificar em R\$</span>
\t                            <input type=\"text\" name=\"zonefreeshippingtotal\" id=\"zonefreeshippingtotal\" class=\"form-control\" value=\"";
        // line 153
        echo twig_safe_filter((isset($context['FreeShippingTotal']) ? $context['FreeShippingTotal'] : null));
        echo "\" />
\t                        </div>
\t                    </div>
\t\t\t\t\t</div>
\t\t\t\t</div>

\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 160
        echo getLang("HandlingFee");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t\t<input type=\"radio\" name=\"zonehandlingtype\" id=\"zonehandlingtype_none\" value=\"none\" onclick=\"ToggleHandlingType(this.value)\" ";
        // line 163
        echo twig_safe_filter((isset($context['HandlingNoneChecked']) ? $context['HandlingNoneChecked'] : null));
        echo " />
\t                        <label for=\"zonehandlingtype_none\">";
        // line 164
        echo getLang("DoNotApplyZoneHandling");
        echo "</label>
\t                    </div>

\t\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t\t<input type=\"radio\" name=\"zonehandlingtype\" id=\"zonehandlingtype_global\" value=\"global\" onclick=\"ToggleHandlingType(this.value)\" ";
        // line 168
        echo twig_safe_filter((isset($context['HandlingGlobalChecked']) ? $context['HandlingGlobalChecked'] : null));
        echo " />
\t                        <label for=\"zonehandlingtype_global\">";
        // line 169
        echo getLang("ApplyZoneHandling1");
        echo "</label>
\t                    </div>

\t\t\t\t\t\t<div id=\"HandlingFeeGlobal\" style=\"";
        // line 172
        echo twig_safe_filter((isset($context['HideHandlingFeeGlobal']) ? $context['HideHandlingFeeGlobal'] : null));
        echo "\">
\t\t\t\t\t\t\t<div class=\"input-group m-t-10 col-sm-8\">
\t                        \t<span class=\"input-group-addon\">Taxa de manuseio em R\$</span>
\t                            <input type=\"text\" name=\"zonehandlingfee\" id=\"zonehandlingfee\" class=\"form-control\" value=\"";
        // line 175
        echo twig_safe_filter((isset($context['HandlingFee']) ? $context['HandlingFee'] : null));
        echo "\" />
\t                        </div>
\t                    </div>

\t\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t\t<input type=\"radio\" name=\"zonehandlingtype\" id=\"zonehandlingtype_2\" value=\"module\" onclick=\"ToggleHandlingType(this.value)\" ";
        // line 180
        echo twig_safe_filter((isset($context['HandlingOptionChecked']) ? $context['HandlingOptionChecked'] : null));
        echo " />
\t                        <label for=\"zonehandlingtype_2\">";
        // line 181
        echo getLang("ApplyZoneHandling2");
        echo "</label>
\t                    </div>

\t\t\t\t\t\t<div class=\"checkbox checkbox-primary HandlingHide\" style=\"";
        // line 184
        echo twig_safe_filter((isset($context['HideHandlingSeparate']) ? $context['HideHandlingSeparate'] : null));
        echo "\">
\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"zonehandlingseparate\" id=\"zonehandlingseparate\" value=\"1\" ";
        // line 185
        echo twig_safe_filter((isset($context['HandlingSeparateChecked']) ? $context['HandlingSeparateChecked'] : null));
        echo " />
\t                        <label for=\"zonehandlingseparate\">";
        // line 186
        echo getLang("YesShowSeparately");
        echo "</label>
\t                    </div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>

\t<div id=\"div1\">
\t\t<p class=\"Intro\">";
        // line 195
        echo getLang("ZoneShippingMethodsIntro");
        echo "</p>
\t\t";
        // line 196
        echo twig_safe_filter((isset($context['MethodsMessage']) ? $context['MethodsMessage'] : null));
        echo "
\t\t
\t\t<p class=\"Intro\">
\t\t\t<input type=\"button\" value=\"";
        // line 199
        echo getLang("AddAShippingMethodButton");
        echo "\" class=\"SmallButton btn btn-success\" onclick=\"window.location = 'index.php?ToDo=addShippingZoneMethod&amp;zoneId=";
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "';\" />
\t\t\t<input type=\"button\" value=\"";
        // line 200
        echo getLang("DeleteSelected");
        echo "\" class=\"SmallButton btn btn-danger\" onclick=\"return ConfirmDeleteSelected();\" ";
        echo twig_safe_filter((isset($context['DisableDeleteMethods']) ? $context['DisableDeleteMethods'] : null));
        echo " />
\t\t</p>

\t\t<div class=\"panel panel-default GridPanel\">
\t\t\t<div class=\"panel-heading\"> 
\t\t\t\t<h3 class=\"panel-title\">Formas de Entrega</h3> 
\t\t\t</div>
\t\t\t<div class=\"panel-body pn\">
\t\t\t\t<table width=\"100%\" class=\"table table-striped m-0\" cellspacing=\"0\" cellpadding=\"0\" style=\"";
        // line 208
        echo twig_safe_filter((isset($context['HideShippingMethodsGrid']) ? $context['HideShippingMethodsGrid'] : null));
        echo "\">
\t\t\t\t\t<thead>
\t\t\t\t\t\t<th style=\"text-align: center; width: 10px;\"><input type=\"checkbox\" onclick=\"\$(this.form).find('input:checkbox').not(':disabled').attr('checked', this.checked);\" /></th>
\t\t\t\t\t\t<th></th>
\t\t\t\t\t\t<th>";
        // line 212
        echo getLang("Name");
        echo "</th>
\t\t\t\t\t\t<th>";
        // line 213
        echo getLang("ShippingMethod");
        echo "</th>
\t\t\t\t\t\t<th style=\"width: 50px; text-align: center;\">";
        // line 214
        echo getLang("Status");
        echo "</th>
\t\t\t\t\t\t<th>";
        // line 215
        echo getLang("Action");
        echo "</th>
\t\t\t\t\t</thead>

\t\t\t\t\t<tbody>
\t\t\t\t\t\t";
        // line 219
        echo twig_safe_filter((isset($context['ShippingZoneMethods']) ? $context['ShippingZoneMethods'] : null));
        echo "
\t\t\t\t\t</tbody>
\t\t\t\t</table>
\t\t\t</div>
\t\t</div>
\t</div>

\t<input type=\"submit\" value=\"";
        // line 226
        echo getLang("Save");
        echo "\" class=\"FormButton btn btn-primary\" />
\t<input type=\"reset\" value=\"";
        // line 227
        echo getLang("Cancel");
        echo "\" class=\"FormButton btn btn-default\" onclick=\"ConfirmCancel()\" />
</form>
<script type=\"text/javascript\">
\tfunction CheckZoneForm()
\t{
\t\tif(\$('#frmZone').attr('action').indexOf('deleteShippingZoneMethods') != -1) {
\t\t\treturn true;
\t\t}

\t\tif(!\$('#zonename').val()) {
\t\t\talert('";
        // line 237
        echo getLang("EnterShippingZoneName");
        echo "');
\t\t\t\$('#zonename').focus();
\t\t\treturn false;
\t\t}

\t\t// If not editing the default, need to check the zone type
\t\tif(\$('#ZoneTypeOptions').css('display') != 'none') {
\t\t\tif(\$('#zonetype_country').attr('checked') == true) {
\t\t\t\tif(g('zonetype_country_list').selectedIndex == -1) {
\t\t\t\t\talert('";
        // line 246
        echo getLang("SelectOneMoreZoneCountries");
        echo "');
\t\t\t\t\t\$('#zonetype_country_list').focus();
\t\t\t\t\treturn false;
\t\t\t\t}
\t\t\t}
\t\t\telse if(\$('#zonetype_state').attr('checked') == true) {
\t\t\t\tif(g('StateCountries').selectedIndex == -1 || g('StateSelect').selectedIndex == -1) {
\t\t\t\t\talert('";
        // line 253
        echo getLang("SelectOneMoreZoneStates");
        echo "');
\t\t\t\t\t\$('#StateSelect').focus();
\t\t\t\t\treturn false;
\t\t\t\t}
\t\t\t}
\t\t\telse if(\$('#zonetype_zip').attr('checked') == true) {
\t\t\t\tif(\$('#zonetype_zip_country').val() < 1) {
\t\t\t\t\talert('";
        // line 260
        echo getLang("SelectZoneZipCountry");
        echo "');
\t\t\t\t\t\$('#zonetype_zip_country').focus();
\t\t\t\t\treturn false;
\t\t\t\t}

\t\t\t\tif(!\$('#zonetype_zip_list').val()) {
\t\t\t\t\talert('";
        // line 266
        echo getLang("EnterOneMoreZoneZipCodes");
        echo "');
\t\t\t\t\t\$('#zonetype_zip_list').focus();
\t\t\t\t\treturn false;
\t\t\t\t}
\t\t\t}
\t\t\telse {
\t\t\t\talert('";
        // line 272
        echo getLang("SelectZoneType");
        echo "');
\t\t\t\treturn false;
\t\t\t}
\t\t}

\t\tif(\$('#zonefreeshipping').attr('checked') == true) {
\t\t\tif(isNaN(priceFormat(\$('#zonefreeshippingtotal').val()))) {
\t\t\t\talert('";
        // line 279
        echo getLang("EnterValidFreeShippingTotal");
        echo "');
\t\t\t\t\$('#zonefreeshippingtotal').select();
\t\t\t\treturn false;
\t\t\t}
\t\t}

\t\tif(\$('#zonehandlingtype_global').attr('checked') == true) {
\t\t\tif(isNaN(priceFormat(\$('#zonehandlingfee')))) {
\t\t\t\talert('";
        // line 287
        echo getLang("EnterValidHandlingFee");
        echo "');
\t\t\t\t\$('#zonehandlingfee').select();
\t\t\t\treturn;
\t\t\t}
\t\t}
\t\treturn true;
\t}

\tfunction UpdateZoneStateSelect()
\t{
\t\tvar options = document.getElementById('StateCountries').options;
\t\tvar selectedCount = 0;
\t\tfor(var i = 0; i < options.length; ++i) {
\t\t\tvar option = options[i];
\t\t\tvar countryId = option.value;
\t\t\tif(option.selected == true) {
\t\t\t\tif(\$('#StateSelect .country'+countryId).length == 0) {
\t\t\t\t\tLoadZoneCountryStates(countryId, option.innerHTML);
\t\t\t\t}
\t\t\t\t++selectedCount;
\t\t\t}
\t\t\telse {
\t\t\t\t\$('#StateSelect .country'+countryId).remove();
\t\t\t\t\$('#StateSelect_old .country'+countryId).remove();
\t\t\t}
\t\t}

\t\tif(selectedCount == 0) {
\t\t\t\$('#ZoneStateSelectNone').css({width: \$('#StateSelect').width(), height: \$('#StateSelect').height()});
\t\t\t\$('#StateSelect').hide();
\t\t\t\$('#ZoneStateSelectNone').show();
\t\t}
\t\telse {
\t\t\t\$('#StateSelect').show();
\t\t\t\$('#ZoneStateSelectNone').hide();
\t\t}
\t}

\tfunction LoadZoneCountryStates(countryId, countryName) {
\t\t// Load this country in
\t\t\$.ajax({
\t\t\turl: 'remote.php?w=countryStates&c='+countryId,
\t\t\tmethod: 'GET',
\t\t\tsuccess: function(response) {
\t\t\t\tvar options = '';
\t\t\t\tif(response != '') {
\t\t\t\t\tstates = response.split(\"~\");
\t\t\t\t\tfor(i = 0; i < states.length; i++) {
\t\t\t\t\t\tvals = states[i].split(\"|\");
\t\t\t\t\t\tif(states[i].length > 0) {
\t\t\t\t\t\t\toptions += '<option value=\"'+countryId+'-'+vals[1]+'\">'+vals[0]+'</option>';
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t}
\t\t\t\tvar data = '<option value=\"'+countryId+'-0\">-- ";
        // line 341
        echo getLang("AllStatesProvinces");
        echo " --</option>' + options;
\t\t\t\tif(document.getElementById('StateSelect_old')) {
\t\t\t\t\t\$('#StateSelect').remove();
\t\t\t\t\t\$('#StateSelect_old').attr('id', 'StateSelect');
\t\t\t\t}
\t\t\t\t\$('#StateSelect').append('<optgroup class=\"country'+countryId+'\" label=\"'+countryName+'\">'+data+'</optgroup>');
\t\t\t\t\$('#StateSelect').css({display: 'block'});
\t\t\t\tISSelectReplacement.replace_select(document.getElementById('StateSelect'));
\t\t\t\tISSelectReplacement.scrollToItem('zonetype_states', countryId+'-0', 1);
\t\t\t}
\t\t});
\t}

\tfunction ToggleHandlingType(type)
\t{
\t\tif(type == 'global') {
\t\t\t\$('#HandlingFeeGlobal').show();
\t\t}
\t\telse {
\t\t\t\$('#HandlingFeeGlobal').hide();
\t\t}

\t\tif(type == 'none') {
\t\t\t\$('.HandlingHide').hide();
\t\t}
\t\telse {
\t\t\t\$('.HandlingHide').show();
\t\t}
\t}

\tfunction ToggleFreeShipping(state)
\t{
\t\tif(state) {
\t\t\t\$('#FreeShippingOptions').show();
\t\t}
\t\telse {
\t\t\t\$('#FreeShippingOptions').hide();
\t\t}
\t}

\tfunction ChangeZoneType(type)
\t{
\t\tswitch(type) {
\t\t\tcase \"state\":
\t\t\t\t\$('#ZoneStateSelectNone').css({width: \$('#StateSelect').css('width'), height: \$('#StateSelect').css('height')});
\t\t\t\t\$('#ZoneTypeCountry').hide();
\t\t\t\t\$('#ZoneTypeStates').show();
\t\t\t\t\$('#ZoneTypePostCodes').hide();
\t\t\t\tbreak;
\t\t\tcase \"zip\":
\t\t\t\t\$('#ZoneTypeCountry').hide();
\t\t\t\t\$('#ZoneTypeStates').hide();
\t\t\t\t\$('#ZoneTypePostCodes').show();
\t\t\t\tbreak;
\t\t\tdefault:
\t\t\t\t\$('#ZoneTypeCountry').show();
\t\t\t\t\$('#ZoneTypeStates').hide();
\t\t\t\t\$('#ZoneTypePostCodes').hide();
\t\t}
\t}

\tfunction ConfirmCancel()
\t{
\t\tif(confirm('";
        // line 404
        echo getLang("ConfirmCancel");
        echo "')) {
\t\t\tif('";
        // line 405
        echo twig_safe_filter((isset($context['CurrentVendor']) ? $context['CurrentVendor'] : null));
        echo "' != 0) {
\t\t\t\twindow.location = 'index.php?ToDo=editVendor&vendorId=";
        // line 406
        echo twig_safe_filter((isset($context['CurrentVendor']) ? $context['CurrentVendor'] : null));
        echo "&currentTab=1';
\t\t\t}
\t\t\telse {
\t\t\t\twindow.location = 'index.php?ToDo=viewShippingSettings&currentTab=1';
\t\t\t}
\t\t}

\t\treturn false;
\t}

\tfunction ShowTab(T)
\t{
\t\ti = 0;
\t\twhile (document.getElementById(\"tab\" + i) != null) {
\t\t\tdocument.getElementById(\"div\" + i).style.display = \"none\";
\t\t\tdocument.getElementById(\"tab\" + i).className = \"\";
\t\t\ti++;
\t\t}

\t\tdocument.getElementById(\"div\" + T).style.display = \"\";
\t\tdocument.getElementById(\"tab\" + T).className = \"active\";
\t\tdocument.getElementById(\"currentTab\").value = T;
\t}

\tfunction ConfirmDeleteSelected()
\t{
\t\tif(!\$('.GridPanel input[type=checkbox].check:checked').length) {
\t\t\talert('";
        // line 433
        echo getLang("SelectOneMoreShippingMethodsDelete");
        echo "');
\t\t\treturn false;
\t\t}
\t\tif(confirm('";
        // line 436
        echo getLang("ConfirmDeleteShippingMethods");
        echo "')) {
\t\t\t\$('#frmZone').attr('action', 'index.php?ToDo=deleteShippingZoneMethods');
\t\t\t\$('#frmZone').submit();
\t\t}
\t\telse {
\t\t\treturn false;
\t\t}
\t}

\t\$(document).ready(function() {
\t\tif(\$('#currentTab').val()) {
\t\t\tShowTab(\$('#currentTab').val());
\t\t}
\t});
</script>";
    }

}
