| @@ 17-37 (lines=21) @@ | ||
| 14 | *  | 
                                |
| 15 | * @package Slick\Form\Renderer  | 
                                |
| 16 | */  | 
                                |
| 17 | class Select extends Input  | 
                                |
| 18 | { | 
                                |
| 19 | ||
| 20 | /**  | 
                                |
| 21 | * @var string The template file to use in the rendering  | 
                                |
| 22 | */  | 
                                |
| 23 | public $template = 'form-inputs/select.twig';  | 
                                |
| 24 | ||
| 25 | /**  | 
                                |
| 26 | * Overrides to remove the unnecessary value attribute  | 
                                |
| 27 | * @param array $context  | 
                                |
| 28 | * @return string  | 
                                |
| 29 | */  | 
                                |
| 30 | public function render($context = [])  | 
                                |
| 31 |     { | 
                                |
| 32 |         if ($this->getElement()->hasAttribute('value')) { | 
                                |
| 33 |             $this->getElement()->getAttributes()->remove('value'); | 
                                |
| 34 | }  | 
                                |
| 35 | return parent::render($context);  | 
                                |
| 36 | }  | 
                                |
| 37 | }  | 
                                |
| @@ 12-32 (lines=21) @@ | ||
| 9 | namespace Slick\Form\Renderer;  | 
                                |
| 10 | ||
| 11 | ||
| 12 | class TextArea extends Input  | 
                                |
| 13 | { | 
                                |
| 14 | ||
| 15 | /**  | 
                                |
| 16 | * @var string The template file to use in the rendering  | 
                                |
| 17 | */  | 
                                |
| 18 | public $template = 'form-inputs/textarea.twig';  | 
                                |
| 19 | ||
| 20 | /**  | 
                                |
| 21 | * Overrides to remove the unnecessary value attribute  | 
                                |
| 22 | * @param array $context  | 
                                |
| 23 | * @return string  | 
                                |
| 24 | */  | 
                                |
| 25 | public function render($context = [])  | 
                                |
| 26 |     { | 
                                |
| 27 |         if ($this->getElement()->hasAttribute('value')) { | 
                                |
| 28 |             $this->getElement()->getAttributes()->remove('value'); | 
                                |
| 29 | }  | 
                                |
| 30 | return parent::render($context);  | 
                                |
| 31 | }  | 
                                |
| 32 | }  | 
                                |