<?php

/* category.form.tpl */
class __TwigTemplate_270f172e15b13f267de0b901d3f2b849 extends Twig_Template
{
    public function display(array $context)
    {
        // line 1
        $context['forms'] = $this->env->loadTemplate("macros/forms.tpl", true);
        // line 2
        $context['util'] = $this->env->loadTemplate("macros/util.tpl", true);
        echo "<link rel=\"stylesheet\" href=\"Styles/categories.css\" type=\"text/css\" />
<form enctype=\"multipart/form-data\" action=\"index.php?ToDo=";
        // line 4
        echo twig_safe_filter((isset($context['FormAction']) ? $context['FormAction'] : null));
        echo "\" name=\"frmAddCategory\" id=\"frmAddCategory\" method=\"post\" class=\" form-horizontal\">
\t";
        // line 5
        echo twig_safe_filter((isset($context['hiddenFields']) ? $context['hiddenFields'] : null));
        echo "

\t<div class=\"row\">
\t\t<div class=\"col-sm-12\">
\t\t\t<h4 class=\"page-title\">";
        // line 9
        echo twig_safe_filter((isset($context['CatTitle']) ? $context['CatTitle'] : null));
        echo "</h4>
\t\t\t<p>";
        // line 10
        echo twig_safe_filter((isset($context['CatIntro']) ? $context['CatIntro'] : null));
        echo "</p>
\t\t\t";
        // line 11
        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<input type=\"submit\" value=\"";
        // line 17
        echo getLang("SaveAndExit");
        echo "\" class=\"btn btn-primary\" />
\t\t\t<input type=\"submit\" name=\"addAnother2\" value=\"";
        // line 18
        echo twig_safe_filter((isset($context['SaveAndAddAnother']) ? $context['SaveAndAddAnother'] : null));
        echo "\" class=\"btn btn-primary\" />
\t\t\t<input type=\"button\" name=\"CancelButton1\" value=\"";
        // line 19
        echo getLang("Cancel");
        echo "\" class=\"btn btn-default\" onclick=\"ConfirmCancel();\" />
\t\t\t<input id=\"currentTab\" name=\"currentTab\" value=\"details\" type=\"hidden\">
\t\t</div>
\t</div>
\t<br />

\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 28
        echo getLang("CatDetails");
        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 33
        echo getLang("CatName");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"catname\" id=\"catname\" class=\"form-control\" value=\"";
        // line 35
        echo twig_safe_filter((isset($context['CategoryName']) ? $context['CategoryName'] : 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\">URL da Categoria</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"caturl\" id=\"caturl\" class=\"form-control\" value=\"";
        // line 42
        echo twig_safe_filter((isset($context['CategoryUrl']) ? $context['CategoryUrl'] : 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\">Ativar Google Merchant?</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input ";
        // line 49
        echo twig_safe_filter((isset($context['DisablegoogleCheckbox']) ? $context['DisablegoogleCheckbox'] : null));
        echo " type=\"checkbox\" name=\"catenablegoogle\" id=\"catenablegoogle\" ";
        echo twig_safe_filter((isset($context['CheckEnablegoogle']) ? $context['CheckEnablegoogle'] : null));
        echo " />
\t\t\t\t\t\t<label for=\"catenablegoogle\">Sim, habilitar a pesquisa de produtos do Google para esta categoria</label>
\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\">ID Google</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" id=\"catidgoogle\" name=\"catidgoogle\" class=\"form-control\" value=\"";
        // line 57
        echo twig_safe_filter((isset($context['CategoryIdGoogle']) ? $context['CategoryIdGoogle'] : 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 62
        echo getLang("CatDesc");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t";
        // line 64
        echo twig_safe_filter((isset($context['WYSIWYG']) ? $context['WYSIWYG'] : 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("CatParentCategory");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<select size=\"10\" name=\"catparentid\" id=\"catparentid\" class=\"form-control\">
\t\t\t\t\t\t\t";
        // line 72
        echo twig_safe_filter((isset($context['CategoryOptions']) ? $context['CategoryOptions'] : 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 78
        echo getLang("TemplateLayoutFile");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<select name=\"catlayoutfile\" id=\"catlayoutfile\" class=\"form-control\">
\t\t\t\t\t\t\t";
        // line 81
        echo twig_safe_filter((isset($context['LayoutFiles']) ? $context['LayoutFiles'] : 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 87
        echo getLang("CatSort");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"text\" name=\"catsort\" id=\"catsort\" class=\"form-control\" size=\"5\" style=\"width: 100px;\" value=\"";
        // line 89
        echo twig_safe_filter((isset($context['CategorySort']) ? $context['CategorySort'] : null));
        echo "\">
\t\t\t\t\t</div>
\t\t\t\t</div>

\t\t\t\t<div class=\"form-group\" id='CategoryImageRow' style=\"display:none\">
\t\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 94
        echo getLang("CatImage");
        echo "</label>
\t\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t\t<input type=\"file\" id=\"catimagefile\" name=\"catimagefile\" class=\"form-control\" ";
        // line 96
        echo twig_safe_filter((isset($context['DisableFileUpload']) ? $context['DisableFileUpload'] : null));
        echo " />
\t\t\t\t\t\t<div id=\"YesUseImageRow\" style=\"display:";
        // line 97
        echo twig_safe_filter((isset($context['ShowYesUseImageRow']) ? $context['ShowYesUseImageRow'] : null));
        echo "\">
\t\t\t\t\t\t\t<div class=\"checkbox checkbox-primary\">
\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"YesUseImage\" name=\"YesUseImage\" value=\"1\" checked />
\t\t\t\t\t\t\t\t<label for=\"YesUseImage\">";
        // line 100
        echo twig_safe_filter((isset($context['CatImageFile']) ? $context['CatImageFile'] : null));
        echo " <span id=\"PreviewCatImage\"> - <a title=\"";
        echo getLang("PreviewCatImage");
        echo "\" href=\"";
        echo twig_safe_filter((isset($context['CatImageLink']) ? $context['CatImageLink'] : null));
        echo "\" target=\"_blank\">";
        echo getLang("Preview");
        echo "</a></span></label>
\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</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 110
        echo getLang("SearchEngineOptimization");
        echo "</h3> 
\t\t\t</div> 

\t\t\t<div class=\"panel-body\">
\t\t\t\t<div class=\"row\">
\t\t\t\t\t<div class=\"col-md-6\">
\t\t\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t\t\t<label class=\"col-md-4 control-label\">";
        // line 117
        echo getLang("PageTitle");
        echo "</label>
\t\t\t\t\t\t\t<div class=\"col-md-8\">
\t\t\t\t\t\t\t\t<input type=\"text\" id=\"catpagetitle\" name=\"catpagetitle\" class=\"form-control\" value=\"";
        // line 119
        echo twig_safe_filter((isset($context['CategoryPageTitle']) ? $context['CategoryPageTitle'] : null));
        echo "\" />
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
                    </div>

                    <div class=\"col-md-6\">
\t\t\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t\t\t<label class=\"col-md-4 control-label\">";
        // line 126
        echo getLang("MetaKeywords");
        echo "</label>
\t\t\t\t\t\t\t<div class=\"col-md-8\">
\t\t\t\t\t\t\t\t<input type=\"text\" id=\"catmetakeywords\" name=\"catmetakeywords\" class=\"form-control\" value=\"";
        // line 128
        echo twig_safe_filter((isset($context['CategoryMetaKeywords']) ? $context['CategoryMetaKeywords'] : null));
        echo "\" />
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
                    </div>
                </div>

\t\t\t\t<div class=\"row\">
\t\t\t\t\t<div class=\"col-md-6\">
\t\t\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t\t\t<label class=\"col-md-4 control-label\">";
        // line 137
        echo getLang("MetaDescription");
        echo "</label>
\t\t\t\t\t\t\t<div class=\"col-md-8\">
\t\t\t\t\t\t\t\t<input type=\"text\" id=\"catmetadesc\" name=\"catmetadesc\" class=\"form-control\" value=\"";
        // line 139
        echo twig_safe_filter((isset($context['CategoryMetaDesc']) ? $context['CategoryMetaDesc'] : null));
        echo "\" />
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
                    </div>

                    <div class=\"col-md-6\">
\t\t\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t\t\t<label class=\"col-md-4 control-label\">";
        // line 146
        echo getLang("SearchKeywords");
        echo "</label>
\t\t\t\t\t\t\t<div class=\"col-md-8\">
\t\t\t\t\t\t\t\t<input type=\"text\" id=\"catsearchkeywords\" name=\"catsearchkeywords\" class=\"form-control\" value=\"";
        // line 148
        echo twig_safe_filter((isset($context['CategorySearchKeywords']) ? $context['CategorySearchKeywords'] : null));
        echo "\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
                    </div>
                </div>
\t\t\t</div>
\t\t</div>
\t</div>

\t<div class=\"row\">
\t\t<div class=\"col-sm-12\">
\t\t\t<input type=\"submit\" value=\"";
        // line 159
        echo getLang("SaveAndExit");
        echo "\" class=\"btn btn-primary\" />
\t\t\t<input type=\"submit\" name=\"addAnother2\" value=\"";
        // line 160
        echo twig_safe_filter((isset($context['SaveAndAddAnother']) ? $context['SaveAndAddAnother'] : null));
        echo "\" class=\"btn btn-primary\" />
\t\t\t<input type=\"button\" name=\"CancelButton1\" value=\"";
        // line 161
        echo getLang("Cancel");
        echo "\" class=\"btn btn-default\" onclick=\"ConfirmCancel();\" />
\t\t\t<input id=\"currentTab\" name=\"currentTab\" value=\"details\" type=\"hidden\">
\t\t</div>
\t</div>
</form>

";
        // line 167
        $this->env->loadTemplate("category.select.modal.tpl")->display($context);
        echo "<script type=\"text/javascript\" src=\"script/category.selector.js?";
        // line 168
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\" src=\"script/categories.js?";
        // line 169
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\" src=\"../javascript/jquery/plugins/jstree/jquery.jstree.js?";
        // line 170
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>

<script type=\"text/javascript\">
\t\$.extend(lang, {
\t\tCancelMessage\t\t: \"";
        // line 174
        echo twig_safe_filter((isset($context['CancelMessage']) ? $context['CancelMessage'] : null));
        echo "\",
\t\tNoCategoryName\t\t: \"";
        // line 175
        echo Interspire_Template_Extension::jsFilter(getLang("NoCategoryName"), "'");
        echo "\",
\t\tNoParentCategory\t: \"";
        // line 176
        echo Interspire_Template_Extension::jsFilter(getLang("NoParentCategory"), "'");
        echo "\",
\t\tNoCatSortOrder\t\t: \"";
        // line 177
        echo Interspire_Template_Extension::jsFilter(getLang("NoCatSortOrder"), "'");
        echo "\",
\t\tChooseValidImage\t: \"";
        // line 178
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseValidImage"), "'");
        echo "\",
\t\tCollapseCategory\t: \"";
        // line 179
        echo Interspire_Template_Extension::jsFilter(getLang("CollapseCategory"), "'");
        echo "\",
\t\tExpandCategory\t\t: \"";
        // line 180
        echo Interspire_Template_Extension::jsFilter(getLang("ExpandCategory"), "'");
        echo "\",
\t\tCategorySelectModalIntro\t\t\t: \"";
        // line 181
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingModalIntro"), "'");
        echo "\",
\t\tCategorySelectModalTitle\t\t\t: \"";
        // line 182
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingModalTitle"), "'");
        echo "\",
\t\tCategorySelectLeafCategorySelected\t: \"";
        // line 183
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingLeafCategorySelected"), "'");
        echo "\",
\t\tCategorySelectChooseLeafCategory\t: \"";
        // line 184
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingChooseLeafCategory"), "'");
        echo "\",
\t\tShoppingComparisonCategoryMappings\t: \"";
        // line 185
        echo Interspire_Template_Extension::jsFilter(getLang("ShoppingComparisonCategoryMappings"), "'");
        echo "\",
\t\tShoppingComparisonCategoryMappingsDesc : \"";
        // line 186
        echo Interspire_Template_Extension::jsFilter(getLang("ShoppingComparisonCategoryMappingsDesc"), "'");
        echo "\",
\t\tChooseGooglePsCategory : \"";
        // line 187
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseGooglePsCategory"), "'");
        echo "\",
\t\tChooseGooglePsCategoryIntro : \"";
        // line 188
        echo Interspire_Template_Extension::jsFilter(getLang("ChooseGooglePsCategoryIntro"), "'");
        echo "\",
\t\tCategorySelectLeafCategorySelected : \"";
        // line 189
        echo Interspire_Template_Extension::jsFilter(getLang("CategoryMappingLeafCategorySelected"), "'");
        echo "\",
\t\tEnterGoogleProductCategory : \"";
        // line 190
        echo Interspire_Template_Extension::jsFilter(getLang("EnterGoogleProductCategory"), "'");
        echo "\"
\t});

\tCategoryForm.skipOptimizerConfirmMsg = ";
        // line 193
        echo twig_safe_filter(twig_default_filter((isset($context['SkipOptimizerConfirmMsg']) ? $context['SkipOptimizerConfirmMsg'] : null), "false"));
        echo ";
\tCategoryForm.currentTab = '";
        // line 194
        echo twig_safe_filter((isset($context['CurrentTab']) ? $context['CurrentTab'] : null));
        echo "';

\tCategoryForm.shoppingComparisonModules = {};

\t";
        // line 198
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_iterator_to_array((isset($context['ShoppingComparisonModules']) ? $context['ShoppingComparisonModules'] : null));
        $countable = is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable);
        $length = $countable ? count($context['_seq']) : null;
        $context['loop'] = array(
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        );
        if ($countable) {
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context['_key'] => $context['module']) {
            echo "\t\tCategoryForm.shoppingComparisonModules[\"";
            // line 199
            echo $this->getEnvironment()->getExtension('interspire')->jsFilter($this->getAttribute((isset($context['module']) ? $context['module'] : null), "getId", array(), "any"));
            echo "\"] = {
\t\t\tname: \"";
            // line 200
            echo $this->getEnvironment()->getExtension('interspire')->jsFilter($this->getAttribute((isset($context['module']) ? $context['module'] : null), "getName", array(), "any"));
            echo "\"
\t\t};
\t";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if ($countable) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 202
        echo "\t\$(document).ready(function() {

\t\t// Google Products Search
\t\t\$(\"#enableGoogleProductSearch\").live(\"change\", function() {
\t\t\tif (\$(this).attr('checked')) {
\t\t\t\t\$(\".gpsField\").show();
\t\t\t}
\t\t\telse {
\t\t\t\t\$(\".gpsField\").hide();
\t\t\t}
\t\t});

\t\t";
        // line 215
        if ((isset($context['googlePsEnabled']) ? $context['googlePsEnabled'] : null)) {
            echo "\t\t\t \$(\"#enableGoogleProductSearch\").attr(\"checked\", true);
\t\t";
        }
        // line 217
        echo "
\t\t\$(\"#enableGoogleProductSearch\").change();

\t\t\$(\"#gpsTabShortCut\").live(\"click\", function() {
\t\t\t\$(\"#tab_google_ps\").click();
\t\t\t\$(\"#googlePsCategoryPathReadOnly\").click();
\t\t});

\t\t\$('#catimagefile').live('change', function() {
\t\t\tif (\$(this).val()) {
\t\t\t\t\$(\"#YesUseImageRow\").show();
\t\t\t\t\$(\"#YesUseImage\").attr('checked', true);
\t\t\t\t\$(\"#YesUseImage\").next().text(\$(this).val());
\t\t\t}
\t\t\t\$(\"#PreviewCatImage\").hide();
\t\t});

\t\t";
        // line 235
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context['category']) ? $context['category'] : null), "categoryPicker", array("parentCategory", (isset($context['parentCategories']) ? $context['parentCategories'] : null), false, ("parentCategory-") . ((isset($context['parentCategoryId']) ? $context['parentCategoryId'] : null)), (isset($context['categoryId']) ? $context['categoryId'] : null), ), "method"), "1");
        echo "

\t\t\$(\"#parentCategory\").bind(\"select_node.jstree\", function(event, data) {
\t\t\tvar categoryId = data.inst.get_selected().data(\"id\");
\t\t\t\$(\"#catparentid\").val(categoryId);
\t\t\t\$(\"#catparentid\").change();
\t\t});
\t});
</script>
<script src=\"../javascript/speakingurl.min.js\"></script>
<script src=\"../javascript/jquery.stringtoslug.min.js\"></script>

<script type=\"text/javascript\">
\$(document).ready( function() {
    \$(\"#catname\").stringToSlug({
        setEvents: 'keyup keydown blur',
        getPut: '#caturl',
        space: '-',
        prefix: '',
        suffix: '',
        replace: '',
        AND: 'and',
        options: {},
        callback: false
    });
});
</script>";
    }

}
