@@ -14,7 +14,8 @@ |
||
14 | 14 | parent::__construct($identifier, $name,$label,$value); |
15 | 15 | $this->_input->getField()->setProperty("type", "radio"); |
16 | 16 | $this->_input->setClass("ui radio checkbox"); |
17 | - if(isset($name)) |
|
18 | - $this->_input->getField()->setProperty("name", $name); |
|
17 | + if(isset($name)) { |
|
18 | + $this->_input->getField()->setProperty("name", $name); |
|
19 | + } |
|
19 | 20 | } |
20 | 21 | } |
21 | 22 | \ No newline at end of file |
@@ -8,8 +8,9 @@ |
||
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 | } |
15 | 16 | } |
16 | 17 | \ No newline at end of file |
@@ -29,8 +29,9 @@ discard block |
||
29 | 29 | |
30 | 30 | public function addHeader($title,$niveau=1,$dividing=true){ |
31 | 31 | $header=new HtmlHeader("",$niveau,$title); |
32 | - if($dividing) |
|
33 | - $header->setDividing(); |
|
32 | + if($dividing) { |
|
33 | + $header->setDividing(); |
|
34 | + } |
|
34 | 35 | return $this->addItem($header); |
35 | 36 | } |
36 | 37 | |
@@ -42,13 +43,16 @@ discard block |
||
42 | 43 | if(\is_string($end)){ |
43 | 44 | $label=$end; |
44 | 45 | \array_pop($fields); |
45 | - }else $label=NULL; |
|
46 | + } else { |
|
47 | + $label=NULL; |
|
48 | + } |
|
46 | 49 | } |
47 | 50 | $this->_fields=\array_merge($this->_fields,$fields); |
48 | 51 | $fields=new HtmlFormFields("fields-".$this->identifier."-".$this->count(),$fields); |
49 | 52 | } |
50 | - if(isset($label)) |
|
51 | - $fields=new HtmlFormField("", $fields,$label); |
|
53 | + if(isset($label)) { |
|
54 | + $fields=new HtmlFormField("", $fields,$label); |
|
55 | + } |
|
52 | 56 | $this->addItem($fields); |
53 | 57 | return $fields; |
54 | 58 | } |
@@ -64,7 +68,7 @@ discard block |
||
64 | 68 | public function getField($index){ |
65 | 69 | if(\is_string($index)){ |
66 | 70 | $field=$this->getElementById($index, $this->_fields); |
67 | - }else{ |
|
71 | + } else{ |
|
68 | 72 | $field=$this->_fields[$index]; |
69 | 73 | } |
70 | 74 | return $field; |
@@ -97,12 +101,15 @@ discard block |
||
97 | 101 | */ |
98 | 102 | public function addMessage($identifier,$content,$header=NULL,$icon=NULL,$type=NULL){ |
99 | 103 | $message=new HtmlMessage($identifier,$content); |
100 | - if(isset($header)) |
|
101 | - $message->addHeader($header); |
|
102 | - if(isset($icon)) |
|
103 | - $message->setIcon($icon); |
|
104 | - if(isset($type)) |
|
105 | - $message->setStyle($type); |
|
104 | + if(isset($header)) { |
|
105 | + $message->addHeader($header); |
|
106 | + } |
|
107 | + if(isset($icon)) { |
|
108 | + $message->setIcon($icon); |
|
109 | + } |
|
110 | + if(isset($type)) { |
|
111 | + $message->setStyle($type); |
|
112 | + } |
|
106 | 113 | return $this->addItem($message); |
107 | 114 | } |
108 | 115 |