form validation with Parsley
This commit is contained in:
@ -4,13 +4,18 @@ namespace MailPoet\Form\Block;
|
||||
class Input extends Base {
|
||||
|
||||
static function render($block) {
|
||||
$type = 'text';
|
||||
if($block['id'] === 'email') {
|
||||
$type = 'email';
|
||||
}
|
||||
|
||||
$html = '';
|
||||
|
||||
$html .= '<p class="mailpoet_paragraph">';
|
||||
|
||||
$html .= static::renderLabel($block);
|
||||
|
||||
$html .= '<input type="text" class="mailpoet_input" ';
|
||||
$html .= '<input type="'.$type.'" class="mailpoet_input" ';
|
||||
|
||||
$html .= 'name="'.static::getFieldName($block).'" ';
|
||||
|
||||
|
Reference in New Issue
Block a user