<?php

/* layout.logo.form.tpl */
class __TwigTemplate_ca7c127d51ab10f2eb40048db24dac85 extends Twig_Template
{
    public function display(array $context)
    {
        // line 1
        echo "<script type=\"text/javascript\">

var TextArray = Array(";
        // line 3
        echo twig_safe_filter((isset($context['TextArray']) ? $context['TextArray'] : null));
        echo ");

function UpdateLogoImage(){

\t\$('body').css({'cursor': 'wait'});
\t\$('input').css({'cursor': 'wait'});
\tvar sendData = {'w': 'updatelogo', 'logo': \$('#SelectedLogo').attr('value')};
\tvar i = 0;
\twhile(document.getElementById(\"ExtraText\" + i) != null){
\t\tsendData['ExtraText' + i] = document.getElementById(\"ExtraText\" + i).value;
\t\ti++;
\t}

\tjQuery.ajax({ url: 'remote.php', type: 'POST', dataType: 'xml',
\t\tdata: sendData,
\t\tsuccess: function(xml) {
\t\t\tdisplay_message('";
        // line 19
        echo getLang("LogoOptionsSaved");
        echo " <a href=\"../\" target=\"_blank\">";
        echo getLang("ViewSite");
        echo "</a>', 'success');
\t\t\t\$('#LogoImage').attr('src', \"../";
        // line 20
        echo twig_safe_filter((isset($context['ImageDirectory']) ? $context['ImageDirectory'] : null));
        echo "/\"+\$('logoImage', xml).text()+\"?\"+get_random());
\t\t\t\$('#CurrentLogo').attr('src', \"../";
        // line 21
        echo twig_safe_filter((isset($context['ImageDirectory']) ? $context['ImageDirectory'] : null));
        echo "/\"+\$('logoImage', xml).text()+\"?\"+get_random());
\t\t\t
\t\t\tif(\$('backgroundImage', xml).text() != '' ) {
\t\t\t\t\$('#PreviewLogoImage').css('backgroundImage', 'url(\"' + \$('backgroundImage', xml).text() + '\")');
\t\t\t\t\$('#CurrentLogo').css('backgroundImage', 'url(\"' + \$('backgroundImage', xml).text() + '\")');
\t\t\t} else {
\t\t\t\t\$('#PreviewLogoImage').css('backgroundImage', 'none');
\t\t\t\t\$('#CurrentLogo').css('backgroundImage', 'none');
\t\t\t}

\t\t\t\$('#ImageTextReplacement').hide();
\t\t\t\$('#LogoImage').show();
\t\t\t\$('body').css({'cursor': 'auto'});
\t\t\t\$('input').css({'cursor': 'auto'});

\t\t}
\t});
}

function UpdateLogoOptionNone(){
\t\$('body').css({'cursor': 'wait'});
\t\$('input').css({'cursor': 'wait'});
\tif(\$('#UseAlternateTitle').attr('checked') == true){
\t\tvar UseAlternateTitle = 'true';
\t}else{
\t\tvar UseAlternateTitle = 'false';
\t}

\tvar sendData = {'w': 'updatelogonone', 'AlternateTitle': \$('#AlternateTitle').val(), 'UseAlternateTitle': UseAlternateTitle};

\tjQuery.ajax({ url: 'remote.php', type: 'POST', dataType: 'xml',
\t\tdata: sendData,
\t\tsuccess: function(xml) {
\t\t\tToggleLogoFields('none');
\t\t\t\$('#CurrentLogo').attr('src', \"images/nologo.gif\");
\t\t\tdisplay_message('";
        // line 56
        echo getLang("LogoOptionsSaved");
        echo " <a href=\"../\" target=\"_blank\">";
        echo getLang("ViewSite");
        echo "</a>', 'success');
\t\t\t\$('body').css({'cursor': 'auto'});
\t\t\t\$('input').css({'cursor': 'auto'});
\t\t}
\t});
}
function ToggleLogoFields(option, initial){
\tif (option == 'create' && !\$('#LogoOptioncreate').attr('disabled')) {
\t\t\$('#LogoUpload').hide();
\t\t\$('#LogoText').hide();
\t\tSelectLogo('[template]', \$('#TemplateLogoFile').val(), \$('#TemplateLogoFileNumFields').val()-1);
\t} else if(option == 'upload') {
\t\t\$('#LogoImageOptions').hide();
\t\t\$('#LogoTextOptions').hide();
\t\t\$('#ButtonTable').hide();
\t\t\$('#LogoTextOptions').hide();
\t\t\$('#LogoUpload').show();
\t\t\$('#LogoText').hide();
\t} else {
\t\t\$('#LogoImageOptions').hide();
\t\t\$('#LogoTextOptions').hide();
\t\t\$('#ButtonTable').hide();
\t\t\$('#LogoTextOptions').hide();
\t\t\$('#LogoUpload').hide();
\t\t\$('#LogoText').show();
\t}
}


function SelectLogo(logoName, logoFileName, numTextFields){
\tif(\"";
        // line 86
        echo twig_safe_filter((isset($context['HideLogoOptionsNoFont']) ? $context['HideLogoOptionsNoFont'] : null));
        echo "\" == \"none\") {
\t\treturn;
\t}
\t\$('#ButtonTable').css('display', '');
\t\$('#SelectedLogo').attr('value', logoName);
\t\$('#LogoTextOptionsDiv').show();
\tvar html = '';
\tvar thisText = '';
\tvar refreshImage = false;
\thtml = '<tr><td colspan=\"2\" class=\"Heading2\">Logo Designer</td></tr><tr><td class=\"FieldLabel\">Selected Logo:</td><td style=\"padding: 5px;\"><img id=\"PreviewLogoImage\" src=\"../cache/logos/'+ logoFileName +'\"></td></tr>';

\tfor(i=0;i<=numTextFields;i++) {
\t\tif(typeof(TextArray[i]) == 'undefined'){
\t\t\tthisText = 'Example' + (i+1);
\t\t}
\t\telse {
\t\t\tthisText = TextArray[i];
\t\t\trefreshImage = true;
\t\t}
\t\thtml += '<tr><td class=\"FieldLabel\">Text '+(i+1)+':</td><td align=\"left\" valign=\"top\"><input type=\"text\" name=\"ExtraText'+i+'\" id=\"ExtraText'+i+'\" class=\"Field300\" value=\"'+thisText+'\"></td></tr>';
\t}

\t\$('#LogoTextOptionsDiv').html('<table class=\"Panel\" style=\"margin: 0; display: ";
        // line 108
        echo twig_safe_filter((isset($context['HideLogoOptions']) ? $context['HideLogoOptions'] : null));
        echo "\" id=\"LogoTextOptions\">'+html+'</table>');

\tif(refreshImage){
\t\tRefreshPreviewImage();
\t}
}

function RefreshPreviewImage(){
\t\$('body').css({'cursor': 'wait'});
\t\$('input').css({'cursor': 'wait'});
\tvar sendData = {'w': 'previewlogo', 'logo': \$('#SelectedLogo').attr('value')};
\tvar i = 0;
\twhile(document.getElementById(\"ExtraText\" + i) != null){
\t\tsendData['ExtraText' + i] = document.getElementById(\"ExtraText\" + i).value;
\t\ti++;
\t}

\tjQuery.ajax({ url: 'remote.php', type: 'POST', dataType: 'xml',
\t\tdata: sendData,
\t\tsuccess: function(xml) {
\t\t\t\$('#PreviewLogoImage').attr('src', \"../cache/logos/\"+\$('logoImage', xml).text());
\t\t\t\$('body').css({'cursor': 'auto'});
\t\t\t\$('input').css({'cursor': 'auto'});

\t\t\tif(\$('backgroundImage', xml).text() != '' ) {
\t\t\t\t\$('#CurrentLogo').css('backgroundImage', 'url(\"' + \$('backgroundImage', xml).text() + '\")');
\t\t\t\t\$('#PreviewLogoImage').css('backgroundImage', 'url(\"' + \$('backgroundImage', xml).text() + '\")');
\t\t\t} else {
\t\t\t\t\$('#PreviewLogoImage').css('backgroundImage', 'none');
\t\t\t\t\$('#CurrentLogo').css('backgroundImage', 'none');
\t\t\t}
\t\t}
\t});
}

function CheckAlternateTitle(showBox){

\tif(showBox){
\t\t\$('#AlternateTitle').attr('disabled', !showBox);
\t\t\$('#AlternateTextArea').show();
\t}else{
\t\t\$('#AlternateTitle').attr('disabled', !showBox);
\t\t\$('#AlternateTextArea').hide();
\t}
}

function ToggleLogoTypeFields(value) {
\t\$('#GenericLogoList').hide();
\t\$('#SelectALogo').hide();
}

\$(document).ready(function() {
\tToggleLogoTypeFields('";
        // line 160
        echo twig_safe_filter((isset($context['LogoTypeSelected']) ? $context['LogoTypeSelected'] : null));
        echo "');
\tToggleLogoFields('";
        // line 161
        echo twig_safe_filter((isset($context['LogoImageSelected']) ? $context['LogoImageSelected'] : null));
        echo "', true);
\t\$('#LogoOption";
        // line 162
        echo twig_safe_filter((isset($context['LogoImageSelected']) ? $context['LogoImageSelected'] : null));
        echo "').attr('checked', 'checked');
\tCheckAlternateTitle(\$('#UseAlternateTitle').attr('checked'));
});

</script>
<input type=\"hidden\" id=\"TemplateLogoFile\" value=\"";
        // line 167
        echo twig_safe_filter((isset($context['TemplateLogoFile']) ? $context['TemplateLogoFile'] : null));
        echo "\" />
<input type=\"hidden\" id=\"TemplateLogoFileNumFields\" value=\"";
        // line 168
        echo twig_safe_filter((isset($context['TemplateLogoFileNumFields']) ? $context['TemplateLogoFileNumFields'] : null));
        echo "\" />

<div class=\"alert alert-info\">";
        // line 170
        echo getLang("LogoIntro");
        echo "</div>

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

\t<div class=\"panel-body\">
\t\t<div class=\"form-group\">
\t\t\t<label class=\"col-md-2 control-label\">
\t\t\t\t";
        // line 180
        echo getLang("IWantToLogo");
        echo ":
\t\t\t</label>
\t\t\t\t
\t\t\t<div class=\"col-md-10\">
\t\t\t\t<input type=\"radio\" name=\"LogoOption\" value=\"none\" checked=\"\" id=\"LogoOptionnone\" onclick=\"ToggleLogoFields(this.value);\" /> <label for=\"LogoOptionnone\">";
        // line 184
        echo getLang("LogoOptionText");
        echo "</label><br />
\t\t\t\t<input type=\"radio\" name=\"LogoOption\" value=\"create\" checked=\"\" id=\"LogoOptioncreate\" onclick=\"ToggleLogoFields(this.value);\" ";
        // line 185
        echo twig_safe_filter((isset($context['DisableTemplateOption']) ? $context['DisableTemplateOption'] : null));
        echo " /> <label for=\"LogoOptioncreate\">";
        echo getLang("LogoOptionGenerate");
        echo "</label><br />
\t\t\t\t<input type=\"radio\" name=\"LogoOption\" value=\"upload\" checked=\"\" id=\"LogoOptionupload\" onclick=\"ToggleLogoFields(this.value);\" /> <label for=\"LogoOptionupload\">";
        // line 186
        echo getLang("LogoOptionUpload");
        echo "</label>
\t\t\t\t<br />
\t\t\t</div>
\t\t</div>
\t</div>
</div>

<div class=\"panel panel-default\" style=\"display: ";
        // line 193
        echo twig_safe_filter((isset($context['HideLogoOptions']) ? $context['HideLogoOptions'] : null));
        echo "\" id=\"CurrentSiteLogo\">
\t<div class=\"panel-heading\"> 
\t\t<h3 class=\"panel-title\">";
        // line 195
        echo getLang("CurrentSiteLogo");
        echo "</h3> 
\t</div>

\t<div class=\"panel-body\" style=\"display: ";
        // line 198
        echo twig_safe_filter((isset($context['HideCurrentLogo']) ? $context['HideCurrentLogo'] : null));
        echo "\">
\t\t<div class=\"form-group\">
\t\t\t<label class=\"col-md-2 control-label\">
\t\t\t\t";
        // line 201
        echo getLang("CurrentSiteLogo");
        echo ":
\t\t\t</label>
\t\t\t\t
\t\t\t<div class=\"col-md-10\">
\t\t\t\t<img src=\"";
        // line 205
        echo twig_safe_filter((isset($context['CurrentLogo']) ? $context['CurrentLogo'] : null));
        echo "\" id=\"CurrentLogo\">
\t\t\t</div>
\t\t</div>
\t</div>
</div>

<input type=\"hidden\" name=\"SelectedLogo\" id=\"SelectedLogo\" value=\"none\" />

<div id=\"LogoTextOptionsDiv\" style=\"display: ";
        // line 213
        echo twig_safe_filter((isset($context['HideLogoOptionsNoFont']) ? $context['HideLogoOptionsNoFont'] : null));
        echo "\">
\t<table class=\"Panel\" style=\"margin:0px; display: ";
        // line 214
        echo twig_safe_filter((isset($context['HideLogoOptions']) ? $context['HideLogoOptions'] : null));
        echo "\" id=\"LogoTextOptions\">
\t</table>
</div>

<table class=\"Panel\" style=\"margin:0px; display: none\" id=\"ButtonTable\">
\t<tr>
\t\t<td align=\"left\" valign=\"top\" class=\"PanelBottom\">
\t\t\t<input type=\"button\" value=\"Refresh Preview Image\" class=\"SmallButton btn btn-primary\" onclick=\"RefreshPreviewImage();\" />
\t\t\t<input type=\"button\" value=\"Save Logo Image\" class=\"SmallButton btn btn-primary\" onclick=\"UpdateLogoImage();\" />
\t\t</td>
\t</tr>
</table>

<div class=\"panel panel-default\" style=\"margin:0px; display: ";
        // line 227
        echo twig_safe_filter((isset($context['HideLogoUpload']) ? $context['HideLogoUpload'] : null));
        echo "\" id=\"LogoUpload\">
\t<div class=\"panel-heading\"> 
\t\t<h3 class=\"panel-title\">";
        // line 229
        echo getLang("LogoUpload");
        echo "</h3> 
\t</div>

\t<div class=\"panel-body\">
\t\t<div class=\"form-group\">
\t\t\t<label class=\"col-md-2 control-label\">
\t\t\t\t";
        // line 235
        echo getLang("SelectLogoUpload");
        echo ":
\t\t\t</label>
\t\t\t\t
\t\t\t<div class=\"col-md-10\">
\t\t\t\t<form method=\"post\" action=\"index.php?ToDo=TemplateUploadLogo\" enctype=\"multipart/form-data\">
\t\t\t\t\t<input type=\"file\" name=\"LogoFile\" id=\"LogoFile\" class=\"form-control\" style=\"width: auto; display: inline-block;\" value=\"\" /> <input type=\"submit\" value=\"Enviar Logo\" class=\"btn btn-primary\" />
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
</div>

<div class=\"panel panel-default\" style=\"margin:0px; display: ";
        // line 247
        echo twig_safe_filter((isset($context['HideLogoUpload']) ? $context['HideLogoUpload'] : null));
        echo "\" id=\"LogoText\">
\t<div class=\"panel-heading\"> 
\t\t<h3 class=\"panel-title\">";
        // line 249
        echo getLang("LogoText");
        echo "</h3> 
\t</div>

\t<div class=\"panel-body\">
\t\t<div class=\"form-group\">
\t\t\t<label class=\"col-md-2 control-label\">
\t\t\t\t";
        // line 255
        echo getLang("IWantToLogo");
        echo ":
\t\t\t</label>
\t\t\t\t
\t\t\t<div class=\"col-md-10\">
\t\t\t\t<input type=\"radio\" name=\"UseAlternateTitle\" value=\"no\" id=\"UseWebsiteTitle\" onclick=\"CheckAlternateTitle(false);\" ";
        // line 259
        echo twig_safe_filter((isset($context['AlternateNotChecked']) ? $context['AlternateNotChecked'] : null));
        echo "> <label for=\"UseWebsiteTitle\">";
        echo getLang("LogoUseTitle");
        echo "</label><br/>
\t\t\t\t<input type=\"radio\" name=\"UseAlternateTitle\" value=\"yes\" id=\"UseAlternateTitle\" onclick=\"CheckAlternateTitle(true);\" ";
        // line 260
        echo twig_safe_filter((isset($context['AlternateChecked']) ? $context['AlternateChecked'] : null));
        echo "> <label for=\"UseAlternateTitle\">";
        echo getLang("LogoUseAlternate");
        echo "</label><br/>
\t\t\t\t<div id=\"AlternateTextArea\" style=\"display: none\"><img src=\"images/nodejoin.gif\" width=\"20\" height=\"20\" align=\"absmiddle\"> <input type=\"text\" name=\"AlternateTitle\" id=\"AlternateTitle\" class=\"Field250\" value=\"";
        // line 261
        echo twig_safe_filter((isset($context['AlternateTitle']) ? $context['AlternateTitle'] : null));
        echo "\"></div>
\t\t\t</div>
\t\t</div>
\t</div>
</div>
<br>
<input type=\"button\" value=\"";
        // line 267
        echo getLang("Save");
        echo "\" id=\"LogoUpdateButton\" class=\"btn btn-primary\" onclick=\"UpdateLogoOptionNone();\" />";
    }

}
