@@ -20,6 +20,9 @@ |
||
| 20 | 20 | protected $_tabsType="tabs"; |
| 21 | 21 | protected $stacked=""; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $identifier |
|
| 25 | + */ |
|
| 23 | 26 | public function __construct($identifier, $tagName="ul") { |
| 24 | 27 | parent::__construct($identifier, $tagName); |
| 25 | 28 | $this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%"; |
@@ -22,8 +22,9 @@ |
||
| 22 | 22 | if($this->_equalWidth){ |
| 23 | 23 | $count=$this->count(); |
| 24 | 24 | $this->setClass( Wide::getConstants()["W".$count]." fields"); |
| 25 | - }else |
|
| 26 | - $this->setClass("fields"); |
|
| 25 | + } else { |
|
| 26 | + $this->setClass("fields"); |
|
| 27 | + } |
|
| 27 | 28 | return parent::compile($js,$view); |
| 28 | 29 | } |
| 29 | 30 | |
@@ -16,8 +16,9 @@ discard block |
||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function setValue($value) { |
| 19 | - if(isset($value)) |
|
| 20 | - $this->setProperty("value", $value); |
|
| 19 | + if(isset($value)) { |
|
| 20 | + $this->setProperty("value", $value); |
|
| 21 | + } |
|
| 21 | 22 | return $this; |
| 22 | 23 | } |
| 23 | 24 | |
@@ -26,8 +27,9 @@ discard block |
||
| 26 | 27 | } |
| 27 | 28 | |
| 28 | 29 | public function setPlaceholder($value){ |
| 29 | - if(JString::isNotNull($value)) |
|
| 30 | - $this->setProperty("placeholder", $value); |
|
| 30 | + if(JString::isNotNull($value)) { |
|
| 31 | + $this->setProperty("placeholder", $value); |
|
| 32 | + } |
|
| 31 | 33 | return $this; |
| 32 | 34 | } |
| 33 | 35 | } |
| 34 | 36 | \ No newline at end of file |
@@ -25,8 +25,9 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function addHeader($title,$niveau=1,$dividing=true){ |
| 27 | 27 | $header=new HtmlHeader("",$niveau,$title); |
| 28 | - if($dividing) |
|
| 29 | - $header->setDividing(); |
|
| 28 | + if($dividing) { |
|
| 29 | + $header->setDividing(); |
|
| 30 | + } |
|
| 30 | 31 | return $this->addItem($header); |
| 31 | 32 | } |
| 32 | 33 | |
@@ -55,7 +56,7 @@ discard block |
||
| 55 | 56 | public function getField($index){ |
| 56 | 57 | if(\is_string($index)){ |
| 57 | 58 | $field=$this->getElementById($index, $this->_fields); |
| 58 | - }else{ |
|
| 59 | + } else{ |
|
| 59 | 60 | $field=$this->_fields[$index]; |
| 60 | 61 | } |
| 61 | 62 | return $field; |
@@ -8,8 +8,9 @@ |
||
| 8 | 8 | class HtmlFormInput extends HtmlFormField { |
| 9 | 9 | |
| 10 | 10 | public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) { |
| 11 | - if(!isset($placeholder)) |
|
| 12 | - $placeholder=$label; |
|
| 11 | + if(!isset($placeholder)) { |
|
| 12 | + $placeholder=$label; |
|
| 13 | + } |
|
| 13 | 14 | parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label); |
| 14 | 15 | } |
| 15 | 16 | |
@@ -8,7 +8,8 @@ |
||
| 8 | 8 | if(\is_array($value)){ |
| 9 | 9 | $itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id",""),JArray::getDefaultValue($value, "label",null),JArray::getDefaultValue($value, "type", "text"),JArray::getDefaultValue($value, "value",""),JArray::getDefaultValue($value, "placeholder",JArray::getDefaultValue($value, "label",null))); |
| 10 | 10 | return $itemO; |
| 11 | - }else |
|
| 12 | - return new HtmlFormInput($value); |
|
| 11 | + } else { |
|
| 12 | + return new HtmlFormInput($value); |
|
| 13 | + } |
|
| 13 | 14 | } |
| 14 | 15 | } |
| 15 | 16 | \ No newline at end of file |
@@ -21,8 +21,9 @@ |
||
| 21 | 21 | $label->setProperty("tabindex",0); |
| 22 | 22 | } |
| 23 | 23 | $this->setClass("ui checkbox"); |
| 24 | - if(isset($type)) |
|
| 25 | - $this->setType($type); |
|
| 24 | + if(isset($type)) { |
|
| 25 | + $this->setType($type); |
|
| 26 | + } |
|
| 26 | 27 | $this->wrap("<div class='field'>","</div>"); |
| 27 | 28 | } |
| 28 | 29 | |