<?php

/* settings.shipping.manage.tpl */
class __TwigTemplate_c73e86391900fd973be4cd4bd02b8c07 extends Twig_Template
{
    public function display(array $context)
    {
        // line 1
        echo "<div class=\"row\">
\t<div class=\"col-sm-12\">
\t\t<h4 class=\"page-title\">";
        // line 3
        echo getLang("ShippingSettings");
        echo "</h4>
\t\t<p>";
        // line 4
        echo getLang("ShippingSettingsIntro");
        echo "</p>
\t\t";
        // line 5
        echo twig_safe_filter((isset($context['Message']) ? $context['Message'] : null));
        echo "
\t</div>
</div>

<div class=\"row\">
\t<div class=\"col-sm-12\">
\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<li class=\"tab\"><a href=\"#\" class=\"active\" id=\"tab0\" onclick=\"ShowTab(0)\">";
        // line 12
        echo getLang("StoreLocation");
        echo "</a></li>
\t\t\t<li class=\"tab\"><a href=\"#\" id=\"tab1\" onclick=\"ShowTab(1)\">";
        // line 13
        echo getLang("ShippingZones");
        echo "</a></li>
\t\t\t<br class=\"Clear\" />
\t\t</ul>
\t</div>
</div>
<div id=\"div0\">
\t<form action=\"index.php?ToDo=saveUpdatedShippingSettings\" name=\"frmShippingSettings\" id=\"frmShippingSettings\" method=\"post\" onsubmit=\"return ValidateForm(CheckShippingSettingsForm)\"class=\"form-horizontal\">
\t\t<input id=\"currentTab\" name=\"currentTab\" value=\"";
        // line 20
        echo twig_safe_filter((isset($context['CurrentTab']) ? $context['CurrentTab'] : null));
        echo "\" type=\"hidden\">
\t\t<div class=\"panel panel-default\">
\t\t\t<div class=\"panel-heading\"> 
\t\t\t\t<h3 class=\"panel-title\">Endere&ccedil;o da Empresa</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 28
        echo getLang("CompanyName");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"companyname\" id=\"companyname\" value=\"";
        // line 30
        echo twig_safe_filter((isset($context['CompanyName']) ? $context['CompanyName'] : 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 35
        echo getLang("CompanyAddress");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"companyaddress\" id=\"companyaddress\" value=\"";
        // line 37
        echo twig_safe_filter((isset($context['CompanyAddress']) ? $context['CompanyAddress'] : 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 42
        echo getLang("CompanyCity");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"companycity\" id=\"companycity\" value=\"";
        // line 44
        echo twig_safe_filter((isset($context['CompanyCity']) ? $context['CompanyCity'] : 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 49
        echo getLang("CompanyCountry");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<select name=\"companycountry\" id=\"companycountry\" class=\"form-control\" onchange=\"GetStates(this, 'companystate', 'companystate1')\">
\t\t\t\t\t\t\t";
        // line 52
        echo twig_safe_filter((isset($context['CountryList']) ? $context['CountryList'] : null));
        echo "
\t\t\t\t\t\t</select>
\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 58
        echo getLang("CompanyState");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<div id=\"statemessage\" style=\"color:gray; display:";
        // line 60
        echo twig_safe_filter((isset($context['HideStateNote']) ? $context['HideStateNote'] : null));
        echo "\">-- ";
        echo getLang("ChooseCountryFirst");
        echo " --</div>
\t\t\t\t\t\t<select style=\"display:";
        // line 61
        echo twig_safe_filter((isset($context['HideStateList']) ? $context['HideStateList'] : null));
        echo "\" name=\"companystate\" id=\"companystate\" class=\"form-control\">
\t\t\t\t\t\t\t";
        // line 62
        echo twig_safe_filter((isset($context['StateList']) ? $context['StateList'] : null));
        echo "
\t\t\t\t\t\t</select>
\t\t\t\t\t\t<input style=\"display:";
        // line 64
        echo twig_safe_filter((isset($context['HideStateBox']) ? $context['HideStateBox'] : null));
        echo "\" type=\"text\" name=\"companystate1\" id=\"companystate1\" class=\"form-control\" value=\"";
        echo twig_safe_filter((isset($context['CompanyState']) ? $context['CompanyState'] : null));
        echo "\" />
\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 69
        echo getLang("CompanyZip");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"companyzip\" id=\"companyzip\" value=\"";
        // line 71
        echo twig_safe_filter((isset($context['CompanyZip']) ? $context['CompanyZip'] : null));
        echo "\" class=\"form-control\" />
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>

\t\t<div class=\"row\">
\t\t\t<div class=\"col-sm-12\">
\t\t\t\t<input class=\"FormButton SaveButton btn btn-primary\" type=\"submit\" value=\"";
        // line 79
        echo getLang("Save");
        echo "\">
\t\t\t\t<input type=\"reset\" value=\"";
        // line 80
        echo getLang("Cancel");
        echo "\" class=\"FormButton CancelButton btn btn-default\" />
\t\t\t</div>
\t\t</div>
\t</form>
</div>

<div id=\"div1\">
\t";
        // line 87
        echo twig_safe_filter((isset($context['NoZonesMessage']) ? $context['NoZonesMessage'] : null));
        echo "
\t<p style=\"padding-bottom: 0; margin-bottom: 10px; margin-top: 10px;\">
\t\t<input type=\"button\" name=\"ZoneAddButton\" value=\"";
        // line 89
        echo getLang("AddShippingZoneButton");
        echo "\" class=\"SmallButton btn btn-success\" onclick=\"document.location.href='index.php?ToDo=addShippingZone';\" />
\t\t<input type=\"button\" name=\"ZoneDeleteButton\" value=\"";
        // line 90
        echo getLang("DeleteSelected");
        echo "\" class=\"SmallButton btn btn-danger\" onclick=\"ConfirmDeleteSelected();\" ";
        echo twig_safe_filter((isset($context['DisableDelete']) ? $context['DisableDelete'] : null));
        echo " />
\t</p>
\t
\t<div class=\"GridContainer\">
\t\t";
        // line 94
        echo twig_safe_filter((isset($context['ZoneDataGrid']) ? $context['ZoneDataGrid'] : null));
        echo "
\t</div>
</div>

\t<script type=\"text/javascript\">
\t\tvar selDest = null;
\t\tvar otherBox = null;

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

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

\t\tfunction GetStates(selObj, dest, stateTextBox)
\t\t{
\t\t\tvar country = selObj.options[selObj.selectedIndex].value;
\t\t\tvar statemessage = document.getElementById(\"statemessage\");

\t\t\tselDest = document.getElementById(dest);
\t\t\totherBox = document.getElementById(stateTextBox);
\t\t\tstatemessage.style.display = \"none\";

\t\t\tif(country == \"\")
\t\t\t{
\t\t\t\tResetStates(false);
\t\t\t\tselObj.focus();
\t\t\t}
\t\t\telse
\t\t\t{
\t\t\t\t// Get all of the states for this country
\t\t\t\t//dataMode = 1;
\t\t\t\tDoCallback(\"w=countryStates&c=\"+country);
\t\t\t}
\t\t}

\t\tfunction ResetStates(ShowChoose)
\t\t{
\t\t\tselDest.options.length = 0;

\t\t\tif(ShowChoose)
\t\t\t\tselDest.options[selDest.options.length] = new Option(\"";
        // line 143
        echo getLang("ChooseState");
        echo "\", \"\");
\t\t}

\t\tfunction ProcessData(html)
\t\t{
\t\t\tResetStates(true);
\t\t\tstates = html.split(\"~\");
\t\t\tnumStates = 0;

\t\t\tfor(i = 0; i < states.length; i++)
\t\t\t{
\t\t\t\tvals = states[i].split(\"|\");

\t\t\t\tif(states[i].length > 0) {
\t\t\t\t\tselDest.options[selDest.options.length] = new Option(vals[0], vals[1]);
\t\t\t\t\tnumStates++;
\t\t\t\t}
\t\t\t}

\t\t\t// If there are no states then hide the state dropdown list
\t\t\tif(numStates == 0) {
\t\t\t\tselDest.style.display = \"none\";
\t\t\t\totherBox.style.display = \"\";
\t\t\t}
\t\t\telse {
\t\t\t\tselDest.style.display = \"\";
\t\t\t\totherBox.style.display = \"none\";
\t\t\t}
\t\t}

\t\tfunction ConfirmCancel()
\t\t{\t
\t\t\tif(confirm(\"";
        // line 175
        echo getLang("ConfirmCancelShippingSettings");
        echo "\")) {
\t\t\t\tdocument.location.href = \"index.php?ToDo=viewShippingSettings\";
\t\t\t}
\t\t}

\t\tfunction CheckShippingSettingsForm() {
\t\t\tvar companyname = g(\"companyname\");
\t\t\tvar companyaddress = g(\"companyaddress\");
\t\t\tvar companycity = g(\"companycity\");
\t\t\tvar companycountry = g(\"companycountry\");
\t\t\tvar companystate = g(\"companystate\");
\t\t\tvar companystate1 = g(\"companystate1\");
\t\t\tvar companyzip = g(\"companyzip\");

\t\t\tif(companyname.value == \"\") {
\t\t\t\tShowTab(0);
\t\t\t\talert(\"";
        // line 191
        echo getLang("EnterCompanyName");
        echo "\");
\t\t\t\tcompanyname.focus();
\t\t\t\treturn false;
\t\t\t}

\t\t\tif(companyaddress.value == \"\") {
\t\t\t\tShowTab(0);
\t\t\t\talert(\"";
        // line 198
        echo getLang("EnterCompanyAddress");
        echo "\");
\t\t\t\tcompanyaddress.focus();
\t\t\t\treturn false;
\t\t\t}

\t\t\tif(companycity.value == \"\") {
\t\t\t\tShowTab(0);
\t\t\t\talert(\"";
        // line 205
        echo getLang("EnterCompanyCity");
        echo "\");
\t\t\t\tcompanycity.focus();
\t\t\t\treturn false;
\t\t\t}

\t\t\tif(companycountry.selectedIndex == 0) {
\t\t\t\tShowTab(0);
\t\t\t\talert(\"";
        // line 212
        echo getLang("SelectCompanyCountry");
        echo "\");
\t\t\t\tcompanycountry.focus();
\t\t\t\treturn false;
\t\t\t}

\t\t\tif( (companystate.style.display == \"\" && companystate.selectedIndex == 0) || (companystate1.style.display == \"\" && companystate1.value == \"\") || (companystate.style.display == \"none\" && companystate1.style.display == \"none\") ) {
\t\t\t\tShowTab(0);
\t\t\t\talert(\"";
        // line 219
        echo getLang("SelectEnterCompanyState");
        echo "\");
\t\t\t\treturn false;
\t\t\t}

\t\t\tif(companyzip.value == \"\") {
\t\t\t\tShowTab(0);
\t\t\t\talert(\"";
        // line 225
        echo getLang("EnterCompanyZip");
        echo "\");
\t\t\t\tcompanyzip.focus();
\t\t\t\treturn false;
\t\t\t}

\t\t\treturn true;
\t\t}

\t\tfunction ConfirmDeleteSelected()
\t\t{
\t\t\tif(!\$('.GridContainer input[type=checkbox].check:checked').length) {
\t\t\t\talert('";
        // line 236
        echo getLang("SelectOneMoreZonesDelete");
        echo "');
\t\t\t\treturn false;
\t\t\t}
\t\t\tif(confirm('";
        // line 239
        echo getLang("ConfirmDeleteZones");
        echo "')) {
\t\t\t\t\$('#frmShippingSettings').attr('action', 'index.php?ToDo=deleteShippingZones');
\t\t\t\t\$('#frmShippingSettings').attr('onsubmit', function() { return true});
\t\t\t\t\$('#frmShippingSettings').submit();
\t\t\t}
\t\t\telse {
\t\t\t\treturn false;
\t\t\t}
\t\t}

\t\tfunction ConfirmDeleteZone() {
\t\t\tif(confirm('";
        // line 250
        echo getLang("ConfirmDeleteZone");
        echo "')) {
\t\t\t\treturn true;
\t\t\t}

\t\t\treturn false;
\t\t}

\t\t// Load the main shipping settings tab by default
\t\tShowTab(";
        // line 258
        echo twig_safe_filter((isset($context['CurrentTab']) ? $context['CurrentTab'] : null));
        echo ");
\t</script>
";
    }

}
