Completed
Push — master ( 3cf661...c0f044 )
by Jean-Christophe
03:28
created
Ajax/semantic/html/collections/form/HtmlFormInput.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
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
 }
16 17
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlTextarea.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,18 +11,21 @@
 block discarded – undo
11 11
 		parent::__construct($identifier, "textarea");
12 12
 		$this->setValue($value);
13 13
 		$this->setPlaceholder($placeholder);
14
-		if(isset($rows))
15
-			$this->setRows($rows);
14
+		if(isset($rows)) {
15
+					$this->setRows($rows);
16
+		}
16 17
 	}
17 18
 	public function setValue($value) {
18
-		if(isset($value))
19
-			$this->setContent($value);
19
+		if(isset($value)) {
20
+					$this->setContent($value);
21
+		}
20 22
 		return $this;
21 23
 	}
22 24
 
23 25
 	public function setPlaceholder($value){
24
-		if(JString::isNotNull($value))
25
-			$this->setProperty("placeholder", $value);
26
+		if(JString::isNotNull($value)) {
27
+					$this->setProperty("placeholder", $value);
28
+		}
26 29
 		return $this;
27 30
 	}
28 31
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormRadio.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
 
14 14
 	public function __construct($identifier, $name=NULL,$label=NULL,$value=NULL) {
15 15
 		parent::__construct($identifier, $label, "radio", $value=NULL);
16
-		if(isset($name))
17
-			$this->getField()->setProperty("name", $name);
16
+		if(isset($name)) {
17
+					$this->getField()->setProperty("name", $name);
18
+		}
18 19
 		if(isset($label)){
19 20
 			$this->swapLabel();
20 21
 			$label=$this->getLabel();
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlForm.php 1 patch
Braces   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
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
 
@@ -38,13 +39,16 @@  discard block
 block discarded – undo
38 39
 				if(\is_string($end)){
39 40
 					$label=$end;
40 41
 					\array_pop($fields);
41
-				}else $label=NULL;
42
+				} else {
43
+					$label=NULL;
44
+				}
42 45
 			}
43 46
 			$this->_fields=\array_merge($this->_fields,$fields);
44 47
 			$fields=new HtmlFormFields("fields-".$this->identifier."-".$this->count(),$fields);
45 48
 		}
46
-		if(isset($label))
47
-		 $fields=new HtmlFormField("", $fields,$label);
49
+		if(isset($label)) {
50
+				 $fields=new HtmlFormField("", $fields,$label);
51
+		}
48 52
 		$this->addItem($fields);
49 53
 		return $fields;
50 54
 	}
@@ -60,7 +64,7 @@  discard block
 block discarded – undo
60 64
 	public function getField($index){
61 65
 		if(\is_string($index)){
62 66
 			$field=$this->getElementById($index, $this->_fields);
63
-		}else{
67
+		} else{
64 68
 			$field=$this->_fields[$index];
65 69
 		}
66 70
 		return $field;
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@  discard block
 block discarded – undo
37 37
 		if($this->_equalWidth){
38 38
 			$count=$this->count();
39 39
 			$this->addToProperty("class", Wide::getConstants()["W".$count]." fields");
40
-		}else
41
-			$this->addToProperty("class","fields");
40
+		} else {
41
+					$this->addToProperty("class","fields");
42
+		}
42 43
 		return parent::compile($js,$view);
43 44
 	}
44 45
 
@@ -73,8 +74,9 @@  discard block
 block discarded – undo
73 74
 			$fields[]=new HtmlFormRadio($name."-".$i++,$name,$item,$item);
74 75
 		}
75 76
 		$radios=new HtmlFormFields("fields-".$name,$fields);
76
-		if(isset($label))
77
-			$radios->setLabel($label)->setProperty("for", $name);
77
+		if(isset($label)) {
78
+					$radios->setLabel($label)->setProperty("for", $name);
79
+		}
78 80
 		return $radios;
79 81
 	}
80 82
 
Please login to merge, or discard this patch.