fix when ckeditor is not enabled

This commit is contained in:
Christophe Battarel 2019-04-16 17:22:33 +02:00
parent ce4b67ecaa
commit f4cc1695f4

View File

@ -64,7 +64,7 @@ if (! empty($conf->global->MAIN_MULTILANGS) )
} }
} }
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) if (empty($conf->modFckeditor->enabled) || empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{ {
print '<textarea name="freetext" class="flat" cols="120">'.$conf->global->$freetextconfvar.'</textarea>'; print '<textarea name="freetext" class="flat" cols="120">'.$conf->global->$freetextconfvar.'</textarea>';
} }
@ -97,10 +97,10 @@ if (! empty($conf->global->MAIN_MULTILANGS) )
$('#freetextlang').change(function() $('#freetextlang').change(function()
{ {
<?php <?php
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) if (empty($conf->modFckeditor->enabled) || empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{ {
?> ?>
$('#freetext').html(freetext[$(this).val()]); $('textarea[name=freetext]').val(freetext[$(this).val()]);
<?php <?php
} }
else else