Fix 'Create a new form' link on widgets page having no feedback [MAILPOET-691]

This commit is contained in:
Alexey Stoletniy
2017-02-08 13:30:49 +03:00
parent e126278e32
commit 9c1cbba163

View File

@ -79,9 +79,9 @@ class Widget extends \WP_Widget {
endpoint: 'forms', endpoint: 'forms',
action: 'create' action: 'create'
}).done(function(response) { }).done(function(response) {
if(response.result && response.form_id) { if(response.data && response.data.id) {
window.location = window.location =
"<?php echo $form_edit_url; ?>" + response.form_id; "<?php echo $form_edit_url; ?>" + response.data.id;
} }
}); });
return false; return false;