Fix multiple saving requests when save button clicked multiple times
[MAILPOET-2450]
This commit is contained in:
committed by
Jack Kitterhing
parent
c07072ff67
commit
9c396bdd4e
@@ -44,10 +44,10 @@ export function removeNotice(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function* saveForm() {
|
export function* saveForm() {
|
||||||
yield {
|
|
||||||
type: 'SAVE_FORM_STARTED',
|
|
||||||
};
|
|
||||||
yield {
|
yield {
|
||||||
type: 'SAVE_FORM',
|
type: 'SAVE_FORM',
|
||||||
};
|
};
|
||||||
|
yield {
|
||||||
|
type: 'SAVE_FORM_STARTED',
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,9 @@ import MailPoet from 'mailpoet';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
SAVE_FORM() {
|
SAVE_FORM() {
|
||||||
|
if (select('mailpoet-form-editor').getIsFormSaving()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const formData = select('mailpoet-form-editor').getFormData();
|
const formData = select('mailpoet-form-editor').getFormData();
|
||||||
dispatch('mailpoet-form-editor').removeNotice('save-form');
|
dispatch('mailpoet-form-editor').removeNotice('save-form');
|
||||||
MailPoet.Ajax.post({
|
MailPoet.Ajax.post({
|
||||||
|
Reference in New Issue
Block a user