<?php

/* banner.form.tpl */
class __TwigTemplate_3bada4f4d641872b6b102d2cd56c1ed1 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 "\" id=\"frmBanner\" method=\"post\" class=\"form-horizontal\">
\t<input type=\"hidden\" name=\"bannerId\" value=\"";
        // line 2
        echo twig_safe_filter((isset($context['BannerId']) ? $context['BannerId'] : null));
        echo "\">

\t<div class=\"row\">
\t\t<div class=\"col-sm-12\">
\t\t\t<h4 class=\"page-title\">";
        // line 6
        echo twig_safe_filter((isset($context['Title']) ? $context['Title'] : null));
        echo "</h4>
\t\t\t<p>";
        // line 7
        echo getLang("BannerIntro");
        echo "</p>
\t\t\t";
        // line 8
        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\" name=\"SubmitButton1\" value=\"";
        // line 14
        echo getLang("Save");
        echo "\" class=\"FormButton btn btn-primary\">
\t\t\t<input type=\"button\" name=\"CancelButton1\" value=\"";
        // line 15
        echo getLang("Cancel");
        echo "\" class=\"FormButton btn btn-default\" onclick=\"ConfirmCancel()\"></p>
\t\t</div>
\t</div>
\t<br />

\t<div class=\"panel panel-default form-horizontal\">
\t\t<div class=\"panel-heading\"> 
\t\t\t<h3 class=\"panel-title\">";
        // line 22
        echo getLang("NewBannerDetails");
        echo "</h3> 
\t\t</div> 

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

\t\t\t<div class=\"form-group\">
\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 34
        echo getLang("BannerContent");
        echo "</label>
\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t";
        // line 36
        echo twig_safe_filter((isset($context['WYSIWYG']) ? $context['WYSIWYG'] : null));
        echo "
\t\t\t\t</div>
\t\t\t</div>

\t\t\t<div class=\"form-group\">
\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 41
        echo getLang("BannerPage");
        echo "</label>
\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t<input type=\"radio\" name=\"bannerpage\" id=\"bannerpage1\" value=\"home_page\" ";
        // line 44
        echo twig_safe_filter((isset($context['IsHomePage']) ? $context['IsHomePage'] : null));
        echo " />
\t\t\t\t\t\t<label for=\"bannerpage1\">";
        // line 45
        echo getLang("BannerHomePage");
        echo "</label>
\t\t            </div>

\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t<input type=\"radio\" name=\"bannerpage\" id=\"bannerpage2\" value=\"category_page\" ";
        // line 49
        echo twig_safe_filter((isset($context['IsCategory']) ? $context['IsCategory'] : null));
        echo " />
\t\t\t\t\t\t<label for=\"bannerpage2\">";
        // line 50
        echo getLang("BannerCategoryPage");
        echo "</label>
\t\t\t\t\t\t<br />
\t\t\t\t\t\t
\t\t\t\t\t\t<div id=\"page_category\">
\t\t\t\t\t\t\t<select name=\"bannercat\" id=\"bannercat\" class=\"Field200\">
\t\t\t\t\t\t\t\t<option value=\"\">";
        // line 55
        echo getLang("ChooseACategory");
        echo "</option>
\t\t\t\t\t\t\t\t";
        // line 56
        echo twig_safe_filter((isset($context['CategoryOptions']) ? $context['CategoryOptions'] : null));
        echo "
\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t</div>
\t\t            </div>

\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t<input type=\"radio\" name=\"bannerpage\" id=\"bannerpage3\" value=\"brand_page\" ";
        // line 62
        echo twig_safe_filter((isset($context['IsBrand']) ? $context['IsBrand'] : null));
        echo " />
\t\t\t\t\t\t<label for=\"bannerpage3\">";
        // line 63
        echo getLang("BannerBrandPage");
        echo "</label>
\t\t\t\t\t\t<br />

\t\t\t\t\t\t<div id=\"page_brand\">
\t\t\t\t\t\t\t<select name=\"bannerbrand\" id=\"bannerbrand\" class=\"Field200\">
\t\t\t\t\t\t\t\t<option value=\"\">";
        // line 68
        echo getLang("ChooseABrand");
        echo "</option>
\t\t\t\t\t\t\t\t";
        // line 69
        echo twig_safe_filter((isset($context['BrandOptions']) ? $context['BrandOptions'] : null));
        echo "
\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t</div>
\t\t            </div>

\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t<input type=\"radio\" name=\"bannerpage\" id=\"bannerpage4\" value=\"search_page\" ";
        // line 75
        echo twig_safe_filter((isset($context['IsSearch']) ? $context['IsSearch'] : null));
        echo " />
\t\t\t\t\t\t<label for=\"bannerpage4\">";
        // line 76
        echo getLang("BannerSearchPage");
        echo "</label><br />
\t\t            </div>
\t\t\t\t</div>
\t\t\t</div>

\t\t\t<div class=\"form-group\">
\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 82
        echo getLang("BannerDateRange");
        echo "</label>
\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t<input type=\"radio\" id=\"bannerdate1\" name=\"bannerdate\" value=\"always\" ";
        // line 85
        echo twig_safe_filter((isset($context['IsAlwaysDate']) ? $context['IsAlwaysDate'] : null));
        echo ">
\t\t\t\t\t\t<label for=\"bannerdate1\">";
        // line 86
        echo getLang("BannerDisplayAlways");
        echo "</label>
\t\t            </div>

\t\t\t\t\t<div class=\"radio radio-primary\">
\t\t\t\t\t\t<input type=\"radio\" id=\"bannerdate2\" name=\"bannerdate\" value=\"custom\" ";
        // line 90
        echo twig_safe_filter((isset($context['IsCustomDate']) ? $context['IsCustomDate'] : null));
        echo ">
\t\t\t\t\t\t<label for=\"bannerdate2\">";
        // line 91
        echo getLang("BannerDisplayBetween");
        echo "</label>
\t\t\t\t\t\t<br />
\t\t\t\t\t\t
\t\t\t\t\t\t<div id=\"trCustomDate\" style=\"display:none\">
\t\t\t\t\t\t\t<table border=\"0\" style=\"width: 100%\">
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<td style=\"width: 50px\">
\t\t\t\t\t\t\t\t\t\t";
        // line 98
        echo getLang("BannerFrom");
        echo ":
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t<select name=\"from_day\" id=\"from_day\" class=\"form-control\" style=\"width: auto; display: inline;\">
\t\t\t\t\t\t\t\t\t\t\t";
        // line 102
        echo twig_safe_filter((isset($context['FromDayOptions']) ? $context['FromDayOptions'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t<select name=\"from_month\" id=\"from_month\" class=\"form-control\" style=\"width: auto; display: inline;\">
\t\t\t\t\t\t\t\t\t\t\t";
        // line 105
        echo twig_safe_filter((isset($context['FromMonthOptions']) ? $context['FromMonthOptions'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t<select name=\"from_year\" id=\"from_year\" class=\"form-control\" style=\"width: auto; display: inline;\">
\t\t\t\t\t\t\t\t\t\t\t";
        // line 108
        echo twig_safe_filter((isset($context['FromYearOptions']) ? $context['FromYearOptions'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t";
        // line 114
        echo getLang("BannerTo");
        echo ":
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t<select name=\"to_day\" id=\"to_day\" class=\"form-control\" style=\"width: auto; display: inline;\">
\t\t\t\t\t\t\t\t\t\t\t";
        // line 118
        echo twig_safe_filter((isset($context['ToDayOptions']) ? $context['ToDayOptions'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t<select name=\"to_month\" id=\"to_month\" class=\"form-control\" style=\"width: auto; display: inline;\">
\t\t\t\t\t\t\t\t\t\t\t";
        // line 121
        echo twig_safe_filter((isset($context['ToMonthOptions']) ? $context['ToMonthOptions'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t\t<select name=\"to_year\" id=\"to_year\" class=\"form-control\" style=\"width: auto; display: inline;\">
\t\t\t\t\t\t\t\t\t\t\t";
        // line 124
        echo twig_safe_filter((isset($context['ToYearOptions']) ? $context['ToYearOptions'] : null));
        echo "
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t</div>
\t\t            </div>
\t\t        </div>
\t\t    </div>

\t\t\t<div class=\"form-group\">
\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 135
        echo getLang("Visible");
        echo "</label>
\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t<div class=\"checkbox checkbox-primary\">
\t\t\t\t\t\t<input type=\"checkbox\" id=\"bannerstatus\" name=\"bannerstatus\" value=\"ON\" ";
        // line 138
        echo twig_safe_filter((isset($context['Visible']) ? $context['Visible'] : null));
        echo ">
\t\t\t\t\t\t<label for=\"bannerstatus\">";
        // line 139
        echo getLang("YesBannerVisible");
        echo "</label>
\t\t            </div>
\t\t        </div>
\t\t    </div>

\t\t\t<div class=\"form-group\">
\t\t\t\t<label class=\"col-md-2 control-label\">";
        // line 145
        echo getLang("BannerLocation");
        echo "</label>
\t\t\t\t<div class=\"col-md-10\">
\t\t\t\t\t<select name=\"bannerloc\" id=\"bannerloc\" class=\"form-control\">
\t\t\t\t\t\t<option value=\"\">";
        // line 148
        echo getLang("ChooseALocation");
        echo "</option>
\t\t\t\t\t\t<option value=\"top\" ";
        // line 149
        echo twig_safe_filter((isset($context['IsLocationTop']) ? $context['IsLocationTop'] : null));
        echo ">";
        echo getLang("TopOfPage");
        echo "</option>
\t\t\t\t\t\t<option value=\"meio\" ";
        // line 150
        echo twig_safe_filter((isset($context['IsLocationMeio']) ? $context['IsLocationMeio'] : null));
        echo ">Meio da Página</option>
\t\t\t\t\t\t<option value=\"bottom\" ";
        // line 151
        echo twig_safe_filter((isset($context['IsLocationBottom']) ? $context['IsLocationBottom'] : null));
        echo ">";
        echo getLang("BottomOfPage");
        echo "</option>
\t\t\t\t\t</select>
\t\t\t\t</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\" name=\"SubmitButton1\" value=\"";
        // line 160
        echo getLang("Save");
        echo "\" class=\"FormButton btn btn-primary\">
\t\t\t<input type=\"button\" name=\"CancelButton1\" value=\"";
        // line 161
        echo getLang("Cancel");
        echo "\" class=\"FormButton btn btn-default\" onclick=\"ConfirmCancel()\"></p>
\t\t</div>
\t</div>
</form>

<script type=\"text/javascript\" src=\"../javascript/jquery/plugins/jstree/jquery.jstree.js?";
        // line 166
        echo twig_escape_filter($this->env, (isset($context['JSCacheToken']) ? $context['JSCacheToken'] : null), "1");
        echo "\"></script>
<script type=\"text/javascript\">
\t//<![CDATA[
\t\tvar selected_page = '';

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

\t\tfunction CheckBannerForm() {
\t\t\treturn false;
\t\t}

\t\tfunction ToggleDate(DateType) {
\t\t\tif(DateType == \"custom\") {
\t\t\t\t\$(\"#trCustomDate\").css(\"display\", \"\");
\t\t\t}
\t\t\telse {
\t\t\t\t\$(\"#trCustomDate\").css(\"display\", \"none\");
\t\t\t}
\t\t}

\t\t// Hide the location options on page load
\t\t\$(document).ready(function() {
\t\t\t\$('#page_category').css('display', 'none');
\t\t\t\$('#page_brand').css('display', 'none');

\t\t\t// Do we need to show the custom date range?
\t\t\t";
        // line 195
        echo twig_safe_filter((isset($context['ShowCustomDate']) ? $context['ShowCustomDate'] : null));
        echo "

\t\t\t// Do we need to show the category dropdown?
\t\t\t";
        // line 198
        echo twig_safe_filter((isset($context['ShowCategory']) ? $context['ShowCategory'] : null));
        echo "

\t\t\t";
        // line 200
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context['category']) ? $context['category'] : null), "categoryPicker", array("bannerCategories", (isset($context['CategoryOptions']) ? $context['CategoryOptions'] : null), false, ("category-") . ((isset($context['bannerCategory']) ? $context['bannerCategory'] : null)), ), "method"), "1");
        echo "

\t\t\t\$(\"#bannerCategories\").bind(\"select_node.jstree\", function(event, data) {
\t\t\t\tvar categoryId = data.rslt.obj.data(\"id\");
\t\t\t\t\$(\"#bannercat\").val(categoryId);
\t\t\t});

\t\t\t// Do we need to show the brand dropdown?
\t\t\t";
        // line 208
        echo twig_safe_filter((isset($context['ShowBrand']) ? $context['ShowBrand'] : null));
        echo "

\t\t\t";
        // line 210
        echo twig_safe_filter((isset($context['SelectedJS']) ? $context['SelectedJS'] : null));
        echo "
\t\t});

\t\t\$('#bannerpage1').click(function() {
\t\t\t\$('#page_category').css('display', 'none');
\t\t\t\$('#page_brand').css('display', 'none');
\t\t});

\t\t\$('#bannerpage2').click(function() {
\t\t\t\$('#page_category').css('display', '');
\t\t\t\$('#bannercat').focus();
\t\t\t\$('#page_brand').css('display', 'none');
\t\t});

\t\t\$('#bannerpage3').click(function() {
\t\t\t\$('#page_brand').css('display', '');
\t\t\t\$('#bannerbrand').focus();
\t\t\t\$('#page_category').css('display', 'none');
\t\t});

\t\t\$('#bannerpage4').click(function() {
\t\t\t\$('#page_category').css('display', 'none');
\t\t\t\$('#page_brand').css('display', 'none');
\t\t});

\t\t\$('#bannerdate1').click(function() {
\t\t\t\$('#trCustomDate').css('display', 'none');
\t\t});

\t\t\$('#bannerdate2').click(function() {
\t\t\t\$('#trCustomDate').css('display', '');
\t\t});

\t\t// Save the page type when it's changed
\t\t\$('#bannerpage1').click(function() {
\t\t\tselected_page = \$('#bannerpage1').val();
\t\t});

\t\t\$('#bannerpage2').click(function() {
\t\t\tselected_page = \$('#bannerpage2').val();
\t\t});

\t\t\$('#bannerpage3').click(function() {
\t\t\tselected_page = \$('#bannerpage3').val();
\t\t});

\t\t\$('#bannerpage4').click(function() {
\t\t\tselected_page = \$('#bannerpage4').val();
\t\t});

\t\t// Check the form when it's submitted
\t\t\$('#frmBanner').submit(function() {
\t\t\tif(\$('#bannername').val() == '') {
\t\t\t\talert('";
        // line 263
        echo getLang("EnterBannerName");
        echo "');
\t\t\t\t\$('#bannername').focus();
\t\t\t\t\$('#bannername').select();
\t\t\t\treturn false;
\t\t\t}

\t\t\tswitch(selected_page) {
\t\t\t\tcase 'category_page': {
\t\t\t\t\tif(\$('#bannercat').val() == '') {
\t\t\t\t\t\talert('";
        // line 272
        echo getLang("BannerChooseCat");
        echo "');
\t\t\t\t\t\t\$('#bannercat').focus();
\t\t\t\t\t\treturn false;
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\t}
\t\t\t\tcase 'brand_page': {
\t\t\t\t\tif(\$('#bannerbrand :selected').val() == '') {
\t\t\t\t\t\talert('";
        // line 280
        echo getLang("BannerChooseBrand");
        echo "');
\t\t\t\t\t\t\$('#bannerbrand').focus();
\t\t\t\t\t\treturn false;
\t\t\t\t\t}
\t\t\t\t\tbreak;
\t\t\t\t}
\t\t\t\tcase '': {
\t\t\t\t\talert('";
        // line 287
        echo getLang("ChooseBannerShow");
        echo "');
\t\t\t\t\treturn false;

\t\t\t\t}
\t\t\t}

\t\t\tif(\$('#bannerloc :selected').val() == '') {
\t\t\t\talert('";
        // line 294
        echo getLang("ChooseBannerLocation");
        echo "');
\t\t\t\t\$('#bannerloc').focus();
\t\t\t\treturn false;
\t\t\t}
\t\t});

\t//]]></script>
";
    }

}
