Move save form started action dispatching to control
[MAILPOET-2450]
This commit is contained in:
committed by
Jack Kitterhing
parent
c966797e2b
commit
ce36b3fdfc
@@ -20,6 +20,12 @@ export function saveFormDone(result) {
|
||||
};
|
||||
}
|
||||
|
||||
export function saveFormStarted() {
|
||||
return {
|
||||
type: 'SAVE_FORM_STARTED',
|
||||
};
|
||||
}
|
||||
|
||||
const createAddNoticeAction = (content, status, isDismissible, id) => ({
|
||||
type: 'ADD_NOTICE',
|
||||
content,
|
||||
@@ -47,7 +53,4 @@ export function* saveForm() {
|
||||
yield {
|
||||
type: 'SAVE_FORM',
|
||||
};
|
||||
yield {
|
||||
type: 'SAVE_FORM_STARTED',
|
||||
};
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ export default {
|
||||
if (select('mailpoet-form-editor').getIsFormSaving()) {
|
||||
return;
|
||||
}
|
||||
dispatch('mailpoet-form-editor').saveFormStarted();
|
||||
const formData = select('mailpoet-form-editor').getFormData();
|
||||
dispatch('mailpoet-form-editor').removeNotice('save-form');
|
||||
MailPoet.Ajax.post({
|
||||
|
Reference in New Issue
Block a user