Merge pull request #261 from mailpoet/form_editor_round_1

Form editor round 1
This commit is contained in:
Marco
2015-12-09 14:07:33 +01:00
25 changed files with 242 additions and 154 deletions

View File

@ -231,7 +231,7 @@ var WysijaHistory = {
/* MailPoet Form */
var WysijaForm = {
version: '0.6',
version: '0.7',
options: {
container: 'mailpoet_form_container',
editor: 'mailpoet_form_editor',
@ -317,6 +317,7 @@ var WysijaForm = {
save: function() {
var position = 1,
data = {
'name': $F('mailpoet_form_name'),
'settings': $('mailpoet_form_settings').serialize(true),
'body': [],
'styles': (MailPoet.CodeEditor !== undefined) ? MailPoet.CodeEditor.getValue() : null

View File

@ -20,7 +20,10 @@ function(
$('form.mailpoet_form').each(function() {
var form = $(this);
form.parsley().on('form:submit', function(parsley) {
form.parsley({
errorsWrapper: '<p></p>',
errorTemplate: '<span></span>'
}).on('form:submit', function(parsley) {
var data = form.serializeObject() || {};

View File

@ -42,11 +42,7 @@ define(
return (
<div>
<h2 className="title">
Segment <a
href="javascript:;"
className="add-new-h2"
onClick={ this.history.goBack }
>Back to list</a>
Segment
</h2>
<Form

View File

@ -70,11 +70,7 @@ define(
return (
<div>
<h2 className="title">
Subscriber <a
href="javascript:;"
className="add-new-h2"
onClick={ this.history.goBack }
>Back to list</a>
Subscriber
</h2>
<Form