Update the link for form creation
[MAILPOET-2987]
This commit is contained in:
@@ -127,25 +127,12 @@ const itemActions = [
|
||||
|
||||
class FormList extends React.Component {
|
||||
createForm = () => {
|
||||
MailPoet.Ajax.post({
|
||||
api_version: window.mailpoet_api_version,
|
||||
endpoint: 'forms',
|
||||
action: 'create',
|
||||
}).done((response) => {
|
||||
MailPoet.trackEvent('Forms > Add New', {
|
||||
'MailPoet Free version': window.mailpoet_version,
|
||||
});
|
||||
setTimeout(() => {
|
||||
window.location = window.mailpoet_form_edit_url + response.data.id;
|
||||
}, 200);
|
||||
}).fail((response) => {
|
||||
if (response.errors.length > 0) {
|
||||
MailPoet.Notice.error(
|
||||
response.errors.map((error) => error.message),
|
||||
{ scroll: true }
|
||||
);
|
||||
}
|
||||
MailPoet.trackEvent('Forms > Add New', {
|
||||
'MailPoet Free version': window.mailpoet_version,
|
||||
});
|
||||
setTimeout(() => {
|
||||
window.location = window.mailpoet_form_edit_url;
|
||||
}, 200); // leave some time for the event to track
|
||||
};
|
||||
|
||||
renderItem = (form, actions) => {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
var mailpoet_listing_per_page = <%= items_per_page %>;
|
||||
var mailpoet_segments = <%= json_encode(segments) %>;
|
||||
var mailpoet_form_edit_url =
|
||||
"<%= admin_url('admin.php?page=mailpoet-form-editor&id=') %>";
|
||||
"<%= admin_url('admin.php?page=mailpoet-form-editor') %>";
|
||||
var mailpoet_beacon_articles = [
|
||||
'5e43d3ec2c7d3a7e9ae79da9',
|
||||
'5e3a166204286364bc94dda4',
|
||||
|
Reference in New Issue
Block a user