From 15c4b90132dbbae8b1fbc4762afa73cd7c0c43c1 Mon Sep 17 00:00:00 2001 From: Normann Lou Date: Wed, 15 Apr 2009 03:10:57 +0000 Subject: [PATCH] git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74490 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/ConfirmedPasswordField.php | 2 ++ forms/PasswordField.php | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/forms/ConfirmedPasswordField.php b/forms/ConfirmedPasswordField.php index 530e2a732..c74169b28 100644 --- a/forms/ConfirmedPasswordField.php +++ b/forms/ConfirmedPasswordField.php @@ -117,6 +117,8 @@ class ConfirmedPasswordField extends FormField { } foreach($this->children as $field) { + $field->setDisabled($this->isDisabled()); + $field->setReadonly($this->isReadonly()); $content .= $field->FieldHolder(); } diff --git a/forms/PasswordField.php b/forms/PasswordField.php index 2df9000a1..e02d6e466 100755 --- a/forms/PasswordField.php +++ b/forms/PasswordField.php @@ -25,13 +25,15 @@ class PasswordField extends FormField { function Field() { + $disabled = $this->isDisabled()?"disabled=\"disabled\"":""; + $readonly = $this->isReadonly()?"readonly=\"readonly\"":""; if($this->maxLength) { return "id() . "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . - "\" maxlength=\"$this->maxLength\" size=\"$this->maxLength\"/>"; + "\" maxlength=\"$this->maxLength\" size=\"$this->maxLength\" $disabled $readonly />"; } else { return "id() . - "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" />"; + "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" $disabled $readonly />"; } }