mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE: make PasswordField and ConfirmedPasswordField able to either readonly or disabled.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74538 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
12e2c9cda1
commit
786b777e0e
@ -25,9 +25,9 @@ class PasswordField extends FormField {
|
||||
|
||||
|
||||
function Field() {
|
||||
$disabled = $this->isDisabled()?"disabled=\"disabled\"":"";
|
||||
$readonly = $this->isReadonly()?"readonly=\"readonly\"":"";
|
||||
if($this->maxLength) {
|
||||
$disabled = $this->isDisabled()?"disabled=\"disabled\"":"";
|
||||
$readonly = $this->isReadonly()?"readonly=\"readonly\"":"";
|
||||
return "<input class=\"text\" type=\"password\" id=\"" . $this->id() .
|
||||
"\" name=\"{$this->name}\" value=\"" . $this->attrValue() .
|
||||
"\" maxlength=\"$this->maxLength\" size=\"$this->maxLength\" $disabled $readonly />";
|
||||
|
Loading…
Reference in New Issue
Block a user