cvs: pear /HTML_QuickForm/QuickForm password.php

From: Date: Tue, 18 Jun 2002 09:41:59 +0000
Subject: cvs: pear /HTML_QuickForm/QuickForm password.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4672@lists.php.net to get a copy of this message
mansion Tue Jun 18 05:41:59 2002 EDT Modified files: /pear/HTML_QuickForm/QuickForm password.php Log: Better handling of value display if frozen and clean up some old methods. Index: pear/HTML_QuickForm/QuickForm/password.php diff -u pear/HTML_QuickForm/QuickForm/password.php:1.3 pear/HTML_QuickForm/QuickForm/password.php:1.4 --- pear/HTML_QuickForm/QuickForm/password.php:1.3 Tue Apr 16 04:51:15 2002 +++ pear/HTML_QuickForm/QuickForm/password.php Tue Jun 18 05:41:58 2002 @@ -17,7 +17,7 @@ // | Bertrand Mansion <bmansion@mamasam.com> | // +----------------------------------------------------------------------+ // -// $Id: password.php,v 1.3 2002/04/16 08:51:15 mansion Exp $ +// $Id: password.php,v 1.4 2002/06/18 09:41:58 mansion Exp $ require_once("HTML/QuickForm/input.php"); @@ -31,25 +31,14 @@ * @access public */ class HTML_QuickForm_password extends HTML_QuickForm_input { - - // {{{ properties - - /** - * Password value - * @var - * @since 1.1 - * @access private - */ - var $_value = null; - // }}} // {{{ constructor /** * Class constructor * * @param string $elementName (optional)Input field name attribute - * @param string $value (optional)Input field value + * @param string $elementLabel (optional)Input field label * @param mixed $attributes (optional)Either a typical HTML attribute string * or an associative array * @since 1.0 @@ -64,39 +53,6 @@ } //end constructor // }}} - // {{{ setValue() - - /** - * Sets value for password element - * - * @param string $value Value for password element - * @since 1.0 - * @access public - * @return void - * @throws - */ - function setValue($value) - { - $this->_value = $value; - } //end func setValue - - // }}} - // {{{ getValue() - - /** - * Returns the value of the form element - * - * @since 1.0 - * @access public - * @return void - * @throws - */ - function getValue() - { - return $this->_value; - } // end func getValue - - // }}} // {{{ setSize() /** @@ -143,11 +99,20 @@ */ function getFrozenHtml() { - $html = '**********'; + $value = $this->getValue(); + if (!empty($value)) { + $html = '**********'; + } else { + $html = '&nbsp;'; + } + if ($this->_persistantFreeze) { + $html .= '<input type="hidden" name="' . + $this->getName() . '" value="' . $value . '" />'; + } return $html; } //end func getFrozenHtml // }}} } //end class HTML_QuickForm_password -?> +?> \ No newline at end of file

« previous php.pear.cvs (#4672) next »