summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/classes/Form
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-08-16 14:15:56 +0930
committerPhil Davis <phil.davis@inf.org>2016-08-16 14:15:56 +0930
commit9d3e8723171c727cf43338bd8e95ab2bb7e6a66c (patch)
tree0c6bfba9d9404fc5d0adeb954268090ab82f56bc /src/usr/local/www/classes/Form
parent0ed3b15981b4451efb11839d6ee7b9acf1ed1d84 (diff)
downloadpfsense-9d3e8723171c727cf43338bd8e95ab2bb7e6a66c.zip
pfsense-9d3e8723171c727cf43338bd8e95ab2bb7e6a66c.tar.gz
Code style and comments
No functional change - just making style consistent
Diffstat (limited to 'src/usr/local/www/classes/Form')
-rw-r--r--src/usr/local/www/classes/Form/Button.class.php4
-rw-r--r--src/usr/local/www/classes/Form/Group.class.php2
-rw-r--r--src/usr/local/www/classes/Form/Input.class.php4
-rw-r--r--src/usr/local/www/classes/Form/Section.class.php4
-rw-r--r--src/usr/local/www/classes/Form/Select.class.php8
5 files changed, 11 insertions, 11 deletions
diff --git a/src/usr/local/www/classes/Form/Button.class.php b/src/usr/local/www/classes/Form/Button.class.php
index cf8c0d3..54e619c 100644
--- a/src/usr/local/www/classes/Form/Button.class.php
+++ b/src/usr/local/www/classes/Form/Button.class.php
@@ -39,11 +39,11 @@ class Form_Button extends Form_Input
$this->_tagName = 'a';
$this->addClass('btn-default');
unset($this->_attributes['type']);
- if(isset($icon)) {
+ if (isset($icon)) {
$this->_attributes['icon'] = $icon;
}
}
- else if(isset($icon))
+ else if (isset($icon))
{
$this->_tagSelfClosing = false;
$this->_tagName = 'button';
diff --git a/src/usr/local/www/classes/Form/Group.class.php b/src/usr/local/www/classes/Form/Group.class.php
index 80dd248..b4c8e69 100644
--- a/src/usr/local/www/classes/Form/Group.class.php
+++ b/src/usr/local/www/classes/Form/Group.class.php
@@ -64,7 +64,7 @@ class Form_Group extends Form_Element
public function enableDuplication($max = null, $horiz = false)
{
- if($horiz)
+ if ($horiz)
$this->addClass('user-duplication-horiz'); // added buttons are 2 cols wide with no offset
else
$this->addClass('user-duplication'); // added buttons 10 cols wide with 2 col offset
diff --git a/src/usr/local/www/classes/Form/Input.class.php b/src/usr/local/www/classes/Form/Input.class.php
index 1b7da0e..43ec643 100644
--- a/src/usr/local/www/classes/Form/Input.class.php
+++ b/src/usr/local/www/classes/Form/Input.class.php
@@ -209,7 +209,7 @@ class Form_Input extends Form_Element
// These methods required by pkg_edit and the wizards that map xml element definitions to Form elements
public function setOnclick($text)
{
- if($text)
+ if ($text)
$this->_attributes['onclick'] = $text;
return $this;
@@ -217,7 +217,7 @@ class Form_Input extends Form_Element
public function setOnchange($text)
{
- if($text)
+ if ($text)
$this->_attributes['onchange'] = $text;
return $this;
diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php
index 51ab06a..99e9767 100644
--- a/src/usr/local/www/classes/Form/Section.class.php
+++ b/src/usr/local/www/classes/Form/Section.class.php
@@ -62,12 +62,12 @@ class Form_Section extends Form_Element
}
// Shortcut, adds a group with a password and a confirm password field.
- // The confirm password element is created by apprnding "_confirm" to the name supplied
+ // The confirm password element is created by appending "_confirm" to the name supplied
// The value is overwritten with a default pattern (So the user cannot see it)
public function addPassword(Form_Input $input)
{
$group = new Form_Group($input->getTitle());
- if($input->getValue() != "") {
+ if ($input->getValue() != "") {
$input->setValue(DMYPWD);
}
diff --git a/src/usr/local/www/classes/Form/Select.class.php b/src/usr/local/www/classes/Form/Select.class.php
index 8f5aa97..649166d 100644
--- a/src/usr/local/www/classes/Form/Select.class.php
+++ b/src/usr/local/www/classes/Form/Select.class.php
@@ -47,15 +47,15 @@ class Form_Select extends Form_Input
$options = '';
foreach ($this->_values as $value => $name)
{
- // Things can get wierd if we have mixed types
+ // Things can get weird if we have mixed types
$sval = $this->_value;
- if( (gettype($value) == "integer") && (gettype($sval) == "string") )
+ if ((gettype($value) == "integer") && (gettype($sval) == "string"))
$value = strval($value);
- if (isset($this->_attributes['multiple']))
+ if (isset($this->_attributes['multiple'])) {
$selected = in_array($value, (array)$sval);
- else {
+ } else {
$selected = ($sval == $value);
}
OpenPOWER on IntegriCloud