Split sending pages to form editor
[MAILPOET-3120]
This commit is contained in:
@@ -135,7 +135,6 @@ export default function mapFormDataAfterLoading(data) {
|
||||
backgroundImageUrl: data.settings.background_image_url,
|
||||
backgroundImageDisplay: data.settings.background_image_display,
|
||||
closeButton: data.settings.close_button ?? defaults.formStyles.closeButton,
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -44,7 +44,15 @@ export default {
|
||||
return state.customFields;
|
||||
},
|
||||
getAllAvailablePages(state) {
|
||||
return state.pages;
|
||||
const allWPPages = state.allWpPages.map((page) => ({
|
||||
id: page.id,
|
||||
title: page.name,
|
||||
}));
|
||||
const mailpoetPages = state.mailpoetPages.map((page) => ({
|
||||
id: page.ID,
|
||||
title: page.post_title,
|
||||
}));
|
||||
return mailpoetPages.concat(allWPPages);
|
||||
},
|
||||
getIsFormSaving(state) {
|
||||
return state.isFormSaving;
|
||||
|
@@ -51,7 +51,7 @@ export default () => {
|
||||
formErrors: validateForm(formData, formBlocks),
|
||||
segments: window.mailpoet_form_segments,
|
||||
customFields,
|
||||
pages: window.mailpoet_form_pages,
|
||||
mailpoetPages: window.mailpoet_pages,
|
||||
isFormSaving: false,
|
||||
isCustomFieldSaving: false,
|
||||
isCustomFieldCreating: false,
|
||||
|
Reference in New Issue
Block a user