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:
28
lib/Form/Block/Textarea.php
Normal file
28
lib/Form/Block/Textarea.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace MailPoet\Form\Block;
|
||||
|
||||
class Textarea extends Base {
|
||||
static function render($block) {
|
||||
$html = '';
|
||||
|
||||
$html .= '<p class="mailpoet_paragraph">';
|
||||
|
||||
$html .= static::renderLabel($block);
|
||||
|
||||
$lines = (isset($block['params']['lines']) ? (int)$block['params']['lines'] : 1);
|
||||
|
||||
$html .= '<textarea class="mailpoet_textarea" rows="'.$lines.'" ';
|
||||
|
||||
$html .= 'name="'.static::getFieldName($block).'"';
|
||||
|
||||
$html .= static::renderInputPlaceholder($block);
|
||||
|
||||
$html .= static::getInputValidation($block);
|
||||
|
||||
$html .= '></textarea>';
|
||||
|
||||
$html .= '</p>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user