This commit is contained in:
Pek5892 2023-07-19 11:09:00 +02:00
parent 2314e7ccc3
commit 87be1cd6e1
2 changed files with 19 additions and 1 deletions

View File

@ -43,6 +43,23 @@ function init() {
if ($('form').length) {
$('form').not('.no-check').parsley();
CKEDITOR.on('instanceReady', function () {
$('form textarea').each(function () {
if ($(this).attr('obbligatorio') === "1") {
$(this).attr('required', '');
}
});
$.each(CKEDITOR.instances, function (instance) {
CKEDITOR.instances[instance].on("change", function (e) {
for (instance in CKEDITOR.instances) {
CKEDITOR.instances[instance].updateElement();
$('form').parsley().validate();
}
});
});
});
}
// Aggiunta nell'URL del nome tab su cui tornare dopo il submit

View File

@ -226,7 +226,8 @@ echo '
'label' => tr('Richiesta'),
'name' => 'richiesta',
'id' => 'richiesta_add',
'required' => '1',
'obbligatorio' => 1,
'required' => 1,
'value' => htmlentities($richiesta),
'extra' => 'style=\'max-height:80px;\'',
]);