@@ -9,8 +9,9 @@ discard block |
||
9 | 9 | use TextFieldsTrait; |
10 | 10 | |
11 | 11 | public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) { |
12 | - if(!isset($placeholder) && $type==="text") |
|
13 | - $placeholder=$label; |
|
12 | + if(!isset($placeholder) && $type==="text") { |
|
13 | + $placeholder=$label; |
|
14 | + } |
|
14 | 15 | parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label); |
15 | 16 | $this->_identifier=$identifier; |
16 | 17 | } |
@@ -18,8 +19,9 @@ discard block |
||
18 | 19 | public function getDataField(){ |
19 | 20 | $field= $this->getField(); |
20 | 21 | //TODO check getField |
21 | - if($field instanceof HtmlInput) |
|
22 | - $field=$field->getDataField(); |
|
22 | + if($field instanceof HtmlInput) { |
|
23 | + $field=$field->getDataField(); |
|
24 | + } |
|
23 | 25 | return $field; |
24 | 26 | } |
25 | 27 | } |
26 | 28 | \ No newline at end of file |
@@ -10,8 +10,9 @@ |
||
10 | 10 | use TextFieldsTrait; |
11 | 11 | |
12 | 12 | public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) { |
13 | - if(!isset($placeholder)) |
|
14 | - $placeholder=$label; |
|
13 | + if(!isset($placeholder)) { |
|
14 | + $placeholder=$label; |
|
15 | + } |
|
15 | 16 | parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label); |
16 | 17 | $this->_identifier=$identifier; |
17 | 18 | } |