Files
piratepoet/lib/Form/Block/Textarea.php
Jonathan Labreuille 541696863e Form editor
- new/edit in forms listing goes to editor
- fixed editor dependencies (via Webpack)
- updated forms table schema
- saving/loading a form works
2015-11-06 16:09:09 +01:00

28 lines
606 B
PHP

<?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;
}
}