summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/classes
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-08-16 14:15:56 +0930
committerStephen Beaver <sbeaver@netgate.com>2016-08-16 09:21:54 -0400
commit9488f42b8190c92b6328697cbe84faad71647675 (patch)
treed67ed8fa47eb873cf9c9adcb766c4a8a81013afe /src/usr/local/www/classes
parentc9cd556bdc4ef615778aa0c28c1030db23abf107 (diff)
downloadpfsense-9488f42b8190c92b6328697cbe84faad71647675.zip
pfsense-9488f42b8190c92b6328697cbe84faad71647675.tar.gz
Code style and comments
No functional change - just making style consistent (cherry picked from commit 9d3e8723171c727cf43338bd8e95ab2bb7e6a66c)
Diffstat (limited to 'src/usr/local/www/classes')
-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 bc13e7a..3460588 100644
--- a/src/usr/local/www/classes/Form/Button.class.php
+++ b/src/usr/local/www/classes/Form/Button.class.php
@@ -71,11 +71,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 1b3aa40..361ceac 100644
--- a/src/usr/local/www/classes/Form/Group.class.php
+++ b/src/usr/local/www/classes/Form/Group.class.php
@@ -96,7 +96,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 48188b3..5b2385a 100644
--- a/src/usr/local/www/classes/Form/Input.class.php
+++ b/src/usr/local/www/classes/Form/Input.class.php
@@ -241,7 +241,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;
@@ -249,7 +249,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 133c7ba..2ccfe41 100644
--- a/src/usr/local/www/classes/Form/Section.class.php
+++ b/src/usr/local/www/classes/Form/Section.class.php
@@ -94,12 +94,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 e64203c..b156793 100644
--- a/src/usr/local/www/classes/Form/Select.class.php
+++ b/src/usr/local/www/classes/Form/Select.class.php
@@ -79,15 +79,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