Skip to content

Commit

Permalink
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapp…
Browse files Browse the repository at this point in the history
…hire/branches/2.3@74490 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Normann Lou authored and Sam Minnee committed Feb 2, 2011
1 parent 2889ab1 commit 15c4b90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions forms/ConfirmedPasswordField.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ function Field() {
}

foreach($this->children as $field) {
$field->setDisabled($this->isDisabled());
$field->setReadonly($this->isReadonly());
$content .= $field->FieldHolder();
}

Expand Down
6 changes: 4 additions & 2 deletions forms/PasswordField.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ function __construct($name, $title = null, $value = "", $maxLength = null) {


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 />";
}
}

Expand Down

0 comments on commit 15c4b90

Please sign in to comment.