<?php

/* products.variation.combination.tpl */
class __TwigTemplate_9f30477f8dbe9963e6e2a0fb338bb409 extends Twig_Template
{
    public function display(array $context)
    {
        // line 1
        echo "<div class=\"row\" id=\"filterBlock\" style=\"display: ";
        echo twig_safe_filter((isset($context['ShowVariationFilter']) ? $context['ShowVariationFilter'] : null));
        echo "\">
\t<div class=\"col-md-6\">
\t\t<div class=\"panel panel-default\">
\t\t\t<div class=\"panel-heading\"> 
\t\t\t\t<h3 class=\"panel-title\">";
        // line 5
        echo getLang("SearchFilter");
        echo "</h3> 
\t\t\t</div> 

\t\t\t<div class=\"panel-body\">
\t\t\t\t<div class=\"form-group\" id=\"filterForm\">
\t\t\t\t\t<div id=\"optionList\" class=\"row\">
\t\t\t\t\t\t";
        // line 11
        echo twig_safe_filter((isset($context['FilterOptions']) ? $context['FilterOptions'] : null));
        echo "
\t\t\t\t\t</div>
\t\t\t\t\t<input type=\"button\" value=\"";
        // line 13
        echo getLang("ApplyFilter");
        echo "\" id=\"applyFilter\" class=\"btn btn-primary\" /> ";
        echo getLang("ResetFilter");
        echo "\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>

\t<div class=\"col-md-6\">
\t\t<div class=\"panel panel-default\">
\t\t\t<div class=\"panel-heading\"> 
\t\t\t\t<h3 class=\"panel-title\">";
        // line 22
        echo getLang("BulkUpdate");
        echo "</h3> 
\t\t\t</div> 

\t\t\t<div class=\"panel-body\">
\t\t\t\t<div class=\"form-group\" id=\"bulkUpdateForm\">
\t\t\t\t\t<input type=\"hidden\" name=\"filterOptions\" value=\"";
        // line 27
        echo twig_safe_filter((isset($context['FilterOptionsQuery']) ? $context['FilterOptionsQuery'] : null));
        echo "\" />
\t\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 29
        echo getLang("CanBePurchased");
        echo ":</label>
\t\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t\t<select name=\"updatePurchaseable\" class=\"form-control\">
\t\t\t\t\t\t\t\t<option value=\"noupdate\">";
        // line 32
        echo getLang("DoNotUpdate");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"reset\">";
        // line 33
        echo getLang("ResetField");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"yes\">";
        // line 34
        echo getLang("SYes");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"no\">";
        // line 35
        echo getLang("SNo");
        echo "</option>
\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>

\t\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 41
        echo getLang("VariationPrice");
        echo ":</label>
\t\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t\t<select name=\"updatePriceDiff\" id=\"updatePriceDiff\" onchange=\"if (this.selectedIndex > 1) { \$(this).next('span').show(); \$(this).next('span').find('input').focus(); } else { \$(this).next('span').hide(); }\" class=\"form-control\">
\t\t\t\t\t\t\t\t<option value=\"noupdate\">";
        // line 44
        echo getLang("DoNotUpdate");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"reset\">";
        // line 45
        echo getLang("ResetField");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"add\">";
        // line 46
        echo getLang("VariationAdd");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"subtract\">";
        // line 47
        echo getLang("VariationSubtract");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"fixed\">";
        // line 48
        echo getLang("VariationFixed");
        echo "</option>
\t\t\t\t\t\t\t</select>

\t\t\t\t\t\t\t<span style='display: none'>
\t\t\t\t\t\t\t\t";
        // line 52
        echo twig_safe_filter((isset($context['CurrencyTokenLeft']) ? $context['CurrencyTokenLeft'] : null));
        echo " <input name=\"updatePrice\" id=\"updatePrice\" type='text' class='NumberField'/> ";
        echo twig_safe_filter((isset($context['CurrencyTokenRight']) ? $context['CurrencyTokenRight'] : null));
        echo "
\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>

\t\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 58
        echo getLang("VariationWeight");
        echo ":</label>
\t\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t\t<select class=\"form-control\" name=\"updateWeightDiff\" id=\"updateWeightDiff\" onchange=\"if (this.selectedIndex > 1) { \$(this).next('span').show(); \$(this).next('span').find('input').focus(); } else { \$(this).next('span').hide(); }\">
\t\t\t\t\t\t\t\t<option value=\"noupdate\">";
        // line 61
        echo getLang("DoNotUpdate");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"reset\">";
        // line 62
        echo getLang("ResetField");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"add\">";
        // line 63
        echo getLang("VariationAdd");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"subtract\">";
        // line 64
        echo getLang("VariationSubtract");
        echo "</option>
\t\t\t\t\t\t\t\t<option value=\"fixed\">";
        // line 65
        echo getLang("VariationFixed");
        echo "</option>
\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t<span style='display: none'>
\t\t\t\t\t\t\t\t<input name=\"updateWeight\" id=\"updateWeight\" type='text' class='NumberField' /> ";
        // line 69
        echo twig_safe_filter((isset($context['WeightMeasurement']) ? $context['WeightMeasurement'] : null));
        echo "
\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>

\t\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 75
        echo getLang("Image");
        echo ":</label>
\t\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t\t<input type=\"file\" name=\"updateImage\" id=\"updateImage\" />
\t\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"updateDelImages\" id=\"updateDelImages\" value=\"1\" style=\"width: auto;\" />
\t\t\t\t\t\t\t\t";
        // line 80
        echo getLang("YesDeleteImages");
        echo "\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>

\t\t\t\t\t<div class=\"form-group row VariationStockColumn\" style=\"display: ";
        // line 85
        echo twig_safe_filter((isset($context['HideInv']) ? $context['HideInv'] : null));
        echo "\">
\t\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 86
        echo getLang("CurrentStockLevel");
        echo ":</label>
\t\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t\t<input class=\"NumberField\" name=\"updateStockLevel\" id=\"updateStockLevel\" type=\"text\" />
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>

\t\t\t\t\t<div class=\"form-group row VariationStockColumn\" style=\"display: ";
        // line 92
        echo twig_safe_filter((isset($context['HideInv']) ? $context['HideInv'] : null));
        echo "\">
\t\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 93
        echo getLang("LowStockLevel1");
        echo ":</label>
\t\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t\t<input class=\"NumberField\" name=\"updateLowStockLevel\" id=\"updateLowStockLevel\" type=\"text\" />
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>

\t\t\t\t\t<input class=\"SubmitButton btn btn-primary\" type=\"button\" value=\"";
        // line 99
        echo getLang("ApplyToAll");
        echo "\" id=\"bulkUpdate\" />
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
</div>
<table class=\"GridPanel SortableGrid table table-striped\" style=\"width:100%\" id=\"optionGrid\">
\t<tr>
\t\t<td colspan=\"";
        // line 107
        echo twig_safe_filter((isset($context['ColSpan']) ? $context['ColSpan'] : null));
        echo "\" class=\"VariationSpanRow\">
\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 100%;\">
\t\t\t\t<td align=\"right\" class=\"PagingNav\" style=\"padding:6px 0px 6px 0px; width: 100%;\">
\t\t\t\t\t";
        // line 110
        echo twig_safe_filter((isset($context['Nav']) ? $context['Nav'] : null));
        echo "
\t\t\t\t</td>
\t\t\t</table>
\t\t</td>
\t</tr>
\t<tr>
\t\t<th><span class=\"HelpText\" onmouseout=\"HideQuickHelp(this);\" onmouseover=\"ShowQuickHelp(this, '";
        // line 116
        echo getLang("EnableDisableAll");
        echo "', '";
        echo getLang("EnableDisableAllHelp");
        echo "');\"><input type='checkbox' checked='checked' onclick=\"\$('#optionGrid').find('input[type=checkbox]').attr('checked', this.checked)\" /></span></th>
\t\t";
        // line 117
        echo twig_safe_filter((isset($context['HeaderRows']) ? $context['HeaderRows'] : null));
        echo "
\t\t<th>";
        // line 118
        echo getLang("SKU");
        echo "</th>
\t\t<th><span class=\"HelpText\" onmouseout=\"HideQuickHelp(this);\" onmouseover=\"ShowQuickHelp(this, '";
        // line 119
        echo getLang("VariationPrice");
        echo "', '";
        echo getLang("VariationPriceHelp");
        echo "');\">";
        echo getLang("VariationPrice");
        echo "</span></th>
\t\t<th><span class=\"HelpText\" onmouseout=\"HideQuickHelp(this);\" onmouseover=\"ShowQuickHelp(this, '";
        // line 120
        echo getLang("VariationWeight");
        echo "', '";
        echo getLang("VariationWeightHelp");
        echo "');\">";
        echo getLang("VariationWeight");
        echo "</span></th>
\t\t<th><span class=\"HelpText\" onmouseout=\"HideQuickHelp(this);\" onmouseover=\"ShowQuickHelp(this, '";
        // line 121
        echo getLang("Image");
        echo "', '";
        echo getLang("VariationImageHelp");
        echo "');\">";
        echo getLang("Image");
        echo "</span></th>
\t\t<th style=\"display:";
        // line 122
        echo twig_safe_filter((isset($context['HideInv']) ? $context['HideInv'] : null));
        echo "\" class=\"VariationStockColumn\"><span class=\"HelpText\" onmouseout=\"HideQuickHelp(this);\" onmouseover=\"ShowQuickHelp(this, '";
        echo getLang("StockLevel");
        echo "', '";
        echo getLang("StockLevelHelp");
        echo "');\">";
        echo getLang("StockLevel");
        echo "</span></th>
\t\t<th style=\"display:";
        // line 123
        echo twig_safe_filter((isset($context['HideInv']) ? $context['HideInv'] : null));
        echo "\" class=\"VariationStockColumn\"><span class=\"HelpText\" onmouseout=\"HideQuickHelp(this);\" onmouseover=\"ShowQuickHelp(this, '";
        echo getLang("LowStockLevel");
        echo "', '";
        echo getLang("LowStockLevelHelp");
        echo "');\">";
        echo getLang("LowStockLevel");
        echo "</span></th>
\t</tr>
\t";
        // line 125
        echo twig_safe_filter((isset($context['VariationRows']) ? $context['VariationRows'] : null));
        echo "
\t<tr>
\t\t<td colspan=\"";
        // line 127
        echo twig_safe_filter((isset($context['ColSpan']) ? $context['ColSpan'] : null));
        echo "\" class=\"VariationSpanRow\">
\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 100%;\">
\t\t\t\t<td align=\"right\" class=\"PagingNav\" style=\"padding:6px 0px 6px 0px; width: 100%;\">
\t\t\t\t\t";
        // line 130
        echo twig_safe_filter((isset($context['Nav']) ? $context['Nav'] : null));
        echo "
\t\t\t\t</td>
\t\t\t</table>
\t\t</td>
\t</tr>
</table>
<script type=\"text/javascript\">
\t\$(\"#applyFilter\").click(function() {
\t\tvar formData = \$('#filterForm :input').serializeArray();
\t\tvar showInv = '0';
\t\tif (\$('#prodInvTrack_2').attr('checked')) {
\t\t\tshowInv = 1;
\t\t}

\t\t\$(this).parents('.GridContainer').load('remote.php?w=getVariationCombinations&productId=";
        // line 144
        echo twig_safe_filter((isset($context['VProductId']) ? $context['VProductId'] : null));
        echo "&productHash=";
        echo twig_safe_filter((isset($context['VProductHash']) ? $context['VProductHash'] : null));
        echo "&v=";
        echo twig_safe_filter((isset($context['VariationId']) ? $context['VariationId'] : null));
        echo "&inv=' + showInv, formData, function() {
\t\t\tBindAjaxGridSorting();
\t\t\tBindGridRowHover();
\t\t});
\t});

\t\$(\"#bulkUpdate\").click(function() {
\t\tvar formData = \$('#bulkUpdateForm :input').serialize();
\t\tvar showInv = '0';
\t\tif (\$('#prodInvTrack_2').attr('checked')) {
\t\t\tshowInv = 1;
\t\t}

\t\t// validate the price
\t\tif (\$(\"#updatePriceDiff\").attr('selectedIndex') > 1) {
\t\t\tif (isNaN(priceFormat(\$(\"#updatePrice\").val())) || \$(\"#updatePrice\").val() == '' || \$(\"#updatePrice\").val() < 0) {
\t\t\t\talert(\"";
        // line 160
        echo getLang("UpdateEnterValidPrice");
        echo "\");
\t\t\t\t\$(\"#updatePrice\").focus();
\t\t\t\treturn;
\t\t\t}
\t\t}

\t\t// validate the weight
\t\tif (\$(\"#updateWeightDiff\").attr('selectedIndex') > 1) {
\t\t\tif (isNaN(\$(\"#updateWeight\").val()) || \$(\"#updateWeight\").val() == '' || \$(\"#updateWeight\").val() < 0) {
\t\t\t\talert(\"";
        // line 169
        echo getLang("UpdateEnterValidWeight");
        echo "\");
\t\t\t\t\$(\"#updateWeight\").focus();
\t\t\t\treturn;
\t\t\t}
\t\t}

\t\t// validate stock levels
\t\tif (showInv) {
\t\t\tif (isNaN(\$(\"#updateStockLevel\").val()) || \$(\"#updateStockLevel\").val() < 0) {
\t\t\t\talert(\"";
        // line 178
        echo getLang("UpdateEnterValidStock");
        echo "\");
\t\t\t\t\$(\"#updateStockLevel\").focus();
\t\t\t\treturn;
\t\t\t}

\t\t\tif (isNaN(\$(\"#updateLowStockLevel\").val()) || \$(\"#updateLowStockLevel\").val() < 0) {
\t\t\t\talert(\"";
        // line 184
        echo getLang("UpdateEnterValidLowStock");
        echo "\");
\t\t\t\t\$(\"#updateLowStockLevel\").focus();
\t\t\t\treturn;
\t\t\t}
\t\t}

\t\t\$('#LoadingIndicator').show();

\t\t\$.ajaxFileUpload({
\t\t\turl: 'remote.php?w=bulkUpdateVariations&productId=";
        // line 193
        echo twig_safe_filter((isset($context['VProductId']) ? $context['VProductId'] : null));
        echo "&productHash=";
        echo twig_safe_filter((isset($context['VProductHash']) ? $context['VProductHash'] : null));
        echo "&v=";
        echo twig_safe_filter((isset($context['VariationId']) ? $context['VariationId'] : null));
        echo "&inv=' + showInv + '&' + formData,
\t\t\tsecureuri: false,
\t\t\tfileElementId: 'updateImage',
\t\t\tdataType: 'json',
\t\t\tsuccess: function(data) {
\t\t\t\t\$(\"#bulkUpdate\").parents('.GridContainer').html(data.tableData);

\t\t\t\tBindAjaxGridSorting();
\t\t\t\tBindGridRowHover();
\t\t\t}
\t\t});

\t\t\$('#LoadingIndicator').hide();

\t\treturn;
\t});

\t\$(\"#showFilter\").change(function() {
\t\t\$(\"#filterBlock\").slideToggle('normal');
\t\tSetCookie('showVariationFilter', \$(this).attr('checked'), 365);
\t});

\tfunction resetFilter() {
\t\t\$(\"#optionList select\").each(function() {
\t\t\t\$(this).find('option').removeAttr('selected');
\t\t\t\$(this).find('option:first').attr('selected', 'selected');
\t\t});

\t\t\$(\"#applyFilter\").click();
\t}
</script>
";
    }

}
