git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74490 467b73ca-7a2a-4603-9d3b-597d59a354a9

This commit is contained in:
Normann Lou 2009-04-15 03:10:57 +00:00 committed by Sam Minnee
parent 2889ab115a
commit 15c4b90132
2 changed files with 6 additions and 2 deletions

View File

@ -117,6 +117,8 @@ class ConfirmedPasswordField extends FormField {
}
foreach($this->children as $field) {
$field->setDisabled($this->isDisabled());
$field->setReadonly($this->isReadonly());
$content .= $field->FieldHolder();
}

View File

@ -25,13 +25,15 @@ class PasswordField extends FormField {
function Field() {
$disabled = $this->isDisabled()?"disabled=\"disabled\"":"";
$readonly = $this->isReadonly()?"readonly=\"readonly\"":"";
if($this->maxLength) {
return "<input class=\"text\" type=\"password\" id=\"" . $this->id() .
"\" name=\"{$this->name}\" value=\"" . $this->attrValue() .
"\" maxlength=\"$this->maxLength\" size=\"$this->maxLength\"/>";
"\" maxlength=\"$this->maxLength\" size=\"$this->maxLength\" $disabled $readonly />";
} else {
return "<input class=\"text\" type=\"password\" id=\"" . $this->id() .
"\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" />";
"\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" $disabled $readonly />";
}
}