diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/View/Helper/FormPassword.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/View/Helper/FormPassword.php Thu Jan 20 19:30:54 2011 +0100 @@ -0,0 +1,95 @@ +_getInfo($name, $value, $attribs); + extract($info); // name, value, attribs, options, listsep, disable + + // is it disabled? + $disabled = ''; + if ($disable) { + // disabled + $disabled = ' disabled="disabled"'; + } + + // determine the XHTML value + $valueString = ' value=""'; + if (array_key_exists('renderPassword', $attribs)) { + if ($attribs['renderPassword']) { + $valueString = ' value="' . $this->view->escape($value) . '"'; + } + unset($attribs['renderPassword']); + } + + // XHTML or HTML end tag? + $endTag = ' />'; + if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) { + $endTag= '>'; + } + + // render the element + $xhtml = '_htmlAttribs($attribs) + . $endTag; + + return $xhtml; + } + +}