Form editor

- new/edit in forms listing goes to editor
- fixed editor dependencies (via Webpack)
- updated forms table schema
- saving/loading a form works
This commit is contained in:
Jonathan Labreuille
2015-11-02 19:01:01 +01:00
parent 6c8d2be18c
commit 541696863e
21 changed files with 175 additions and 93 deletions

31
lib/Form/Block/Input.php Normal file
View File

@ -0,0 +1,31 @@
<?php
namespace MailPoet\Form\Block;
class Input extends Base {
static function render($block) {
$html = '';
$html .= '<p class="mailpoet_paragraph">';
$html .= static::renderLabel($block);
$html .= '<input type="text" class="mailpoet_input" ';
$html .= 'name="'.static::getFieldName($block).'" ';
$html .= 'title="'.static::getFieldLabel($block).'" ';
$html .= 'value="'.static::getFieldValue($block).'" ';
$html .= static::renderInputPlaceholder($block);
$html .= static::getInputValidation($block);
$html .= '/>';
$html .= '</p>';
return $html;
}
}