@@ -8,16 +8,18 @@ |
||
8 | 8 | use TextFieldsTrait; |
9 | 9 | |
10 | 10 | public function __construct($identifier, $label = NULL, $type = "text", $value = NULL, $placeholder = NULL) { |
11 | - if (! isset($placeholder) && $type === "text") |
|
12 | - $placeholder = $label; |
|
11 | + if (! isset($placeholder) && $type === "text") { |
|
12 | + $placeholder = $label; |
|
13 | + } |
|
13 | 14 | parent::__construct("field-" . $identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label); |
14 | 15 | $this->_identifier = $identifier; |
15 | 16 | } |
16 | 17 | |
17 | 18 | public function getDataField() { |
18 | 19 | $field = $this->getField(); |
19 | - if ($field instanceof HtmlInput) |
|
20 | - $field = $field->getDataField(); |
|
20 | + if ($field instanceof HtmlInput) { |
|
21 | + $field = $field->getDataField(); |
|
22 | + } |
|
21 | 23 | return $field; |
22 | 24 | } |
23 | 25 |