1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-19 21:10:49 +01:00

Fix minore

This commit is contained in:
Pek5892 2023-07-19 17:30:38 +02:00
parent 87be1cd6e1
commit db700a4809
3 changed files with 20 additions and 14 deletions

View File

@ -44,10 +44,11 @@ function init() {
if ($('form').length) {
$('form').not('.no-check').parsley();
if (window.CKEDITOR){
CKEDITOR.on('instanceReady', function () {
$('form textarea').each(function () {
if ($(this).attr('obbligatorio') === "1") {
$(this).attr('required', '');
if ($(this).data('mandatory') === '1') {
$(this).prop('required', true);
}
});
@ -61,6 +62,7 @@ function init() {
});
});
}
}
// Aggiunta nell'URL del nome tab su cui tornare dopo il submit
// Blocco del pulsante di submit dopo il primo submit

View File

@ -95,6 +95,11 @@ function initCKEditor(input) {
let $input = $(input);
let name = input.getAttribute("id");
if($input.prop('required')){
$input.data('mandatory', '1');
}
// Controllo su istanza già esistente
let instance = CKEDITOR.instances[name];
if (instance) {

View File

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