@@ -43,8 +43,9 @@ discard block |
||
43 | 43 | |
44 | 44 | public function getDataField(){ |
45 | 45 | $field= $this->getField(); |
46 | - if($field instanceof AbstractCheckbox) |
|
47 | - $field=$field->getField(); |
|
46 | + if($field instanceof AbstractCheckbox) { |
|
47 | + $field=$field->getField(); |
|
48 | + } |
|
48 | 49 | return $field; |
49 | 50 | } |
50 | 51 | |
@@ -56,7 +57,7 @@ discard block |
||
56 | 57 | public function setChecked($value=true){ |
57 | 58 | if($value===true){ |
58 | 59 | $this->getDataField()->setProperty("checked", "checked"); |
59 | - }else{ |
|
60 | + } else{ |
|
60 | 61 | $this->getDataField()->removeProperty("checked"); |
61 | 62 | } |
62 | 63 | return $this; |
@@ -13,14 +13,15 @@ discard block |
||
13 | 13 | $field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value); |
14 | 14 | $field->setProperty("name", $name); |
15 | 15 | $this->setField($field); |
16 | - if (isset($label)) |
|
17 | - $this->setLabel($label); |
|
16 | + if (isset($label)) { |
|
17 | + $this->setLabel($label); |
|
18 | + } |
|
18 | 19 | } |
19 | 20 | |
20 | 21 | public function setChecked($value=true){ |
21 | 22 | if($value===true){ |
22 | 23 | $this->getField()->setProperty("checked", "checked"); |
23 | - }else{ |
|
24 | + } else{ |
|
24 | 25 | $this->getField()->removeProperty("checked"); |
25 | 26 | } |
26 | 27 | return $this; |
@@ -49,8 +50,9 @@ discard block |
||
49 | 50 | * @return mixed |
50 | 51 | */ |
51 | 52 | public function getLabel() { |
52 | - if (\array_key_exists("label", $this->content)) |
|
53 | - return $this->content["label"]; |
|
53 | + if (\array_key_exists("label", $this->content)) { |
|
54 | + return $this->content["label"]; |
|
55 | + } |
|
54 | 56 | } |
55 | 57 | |
56 | 58 | /** |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | public function setFocusable($value=true) { |
58 | - if ($value === true) |
|
59 | - $this->setProperty("tabindex", "0"); |
|
60 | - else { |
|
58 | + if ($value === true) { |
|
59 | + $this->setProperty("tabindex", "0"); |
|
60 | + } else { |
|
61 | 61 | $this->removeProperty("tabindex"); |
62 | 62 | } |
63 | 63 | return $this; |
@@ -175,8 +175,9 @@ discard block |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | public static function social($identifier, $social, $value=NULL) { |
178 | - if ($value === NULL) |
|
179 | - $value=\ucfirst($social); |
|
178 | + if ($value === NULL) { |
|
179 | + $value=\ucfirst($social); |
|
180 | + } |
|
180 | 181 | $return=new HtmlButton($identifier, $value); |
181 | 182 | $return->addIcon($social); |
182 | 183 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |