Merge pull request #8686 from MrPetovan/bug/8685-frio-compose-disable-asynchronous
[frio] Disable unexpected asynchronous compose form submission
This commit is contained in:
commit
1e23348635
1 changed files with 9 additions and 4 deletions
|
@ -112,10 +112,8 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//$('ul.flex-nav').flexMenu();
|
|
||||||
|
|
||||||
// initialize the bootstrap tooltips
|
// initialize the bootstrap tooltips
|
||||||
$('body').tooltip({
|
$body.tooltip({
|
||||||
selector: '[data-toggle="tooltip"]',
|
selector: '[data-toggle="tooltip"]',
|
||||||
container: 'body',
|
container: 'body',
|
||||||
animation: true,
|
animation: true,
|
||||||
|
@ -364,10 +362,17 @@ $(document).ready(function(){
|
||||||
|
|
||||||
// Comment form submit
|
// Comment form submit
|
||||||
$body.on('submit', '.comment-edit-form', function(e) {
|
$body.on('submit', '.comment-edit-form', function(e) {
|
||||||
|
let id = $form.data('item-id');
|
||||||
|
|
||||||
|
// Compose page form exception: id is always 0 and form must not be submitted asynchronously
|
||||||
|
if (id === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
let $form = $(this);
|
let $form = $(this);
|
||||||
let id = $form.data('item-id');
|
|
||||||
let $commentSubmit = $form.find('.comment-edit-submit').button('loading');
|
let $commentSubmit = $form.find('.comment-edit-submit').button('loading');
|
||||||
|
|
||||||
unpause();
|
unpause();
|
||||||
|
|
Loading…
Reference in a new issue