mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Fix minore
This commit is contained in:
parent
87be1cd6e1
commit
db700a4809
@ -42,24 +42,26 @@ function init() {
|
||||
});
|
||||
|
||||
if ($('form').length) {
|
||||
$('form').not('.no-check').parsley();
|
||||
$('form').not('.no-check').parsley();
|
||||
|
||||
if (window.CKEDITOR){
|
||||
CKEDITOR.on('instanceReady', function () {
|
||||
$('form textarea').each(function () {
|
||||
if ($(this).attr('obbligatorio') === "1") {
|
||||
$(this).attr('required', '');
|
||||
$('form textarea').each(function () {
|
||||
if ($(this).data('mandatory') === '1') {
|
||||
$(this).prop('required', true);
|
||||
}
|
||||
});
|
||||
|
||||
$.each(CKEDITOR.instances, function (instance) {
|
||||
CKEDITOR.instances[instance].on("change", function (e) {
|
||||
for (instance in CKEDITOR.instances) {
|
||||
CKEDITOR.instances[instance].updateElement();
|
||||
$('form').parsley().validate();
|
||||
}
|
||||
});
|
||||
|
||||
$.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
|
||||
|
@ -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) {
|
||||
|
@ -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;\'',
|
||||
|
Loading…
x
Reference in New Issue
Block a user