summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-28 14:44:32 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-28 14:44:32 -0500
commitddffa78c4d115271f988891438e2470957bf9811 (patch)
treefa1a259fdbf1605c2bde6098b7a5c06e7df2178b /src
parent5ea90990e6ebcdbeb78fadf8b88aedef66428c66 (diff)
downloadpfsense-ddffa78c4d115271f988891438e2470957bf9811.zip
pfsense-ddffa78c4d115271f988891438e2470957bf9811.tar.gz
Don't display dummy password if configured pwd is empty
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/classes/Form/Input.class.php5
-rw-r--r--src/usr/local/www/classes/Form/Section.class.php5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/usr/local/www/classes/Form/Input.class.php b/src/usr/local/www/classes/Form/Input.class.php
index c6110f7..608197d 100644
--- a/src/usr/local/www/classes/Form/Input.class.php
+++ b/src/usr/local/www/classes/Form/Input.class.php
@@ -75,6 +75,11 @@ class Form_Input extends Form_Element
return $this->_title;
}
+ public function getValue()
+ {
+ return $this->_attributes['value'];
+ }
+
public function getName()
{
return $this->_attributes['name'];
diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php
index b0a441a..4ca5953 100644
--- a/src/usr/local/www/classes/Form/Section.class.php
+++ b/src/usr/local/www/classes/Form/Section.class.php
@@ -74,7 +74,10 @@ class Form_Section extends Form_Element
public function addPassword(Form_Input $input)
{
$group = new Form_Group($input->getTitle());
- $input->setValue(DMYPWD);
+ if($input->getValue() != "") {
+ $input->setValue(DMYPWD);
+ }
+
$input->setType("password");
$group->add($input);
$confirm = clone $input;
OpenPOWER on IntegriCloud