mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#1705 - OpenID login details appearing in wrong place
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44621 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5165e64e9d
commit
b636bf165a
@ -202,4 +202,21 @@ JS;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function saveInto(DataObject $record) {
|
||||
if(!($this->canBeEmpty && !$this->value)) {
|
||||
parent::saveInto($record);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a pretty readonly field with some stars in it
|
||||
*/
|
||||
function performReadonlyTransformation() {
|
||||
$stars = '*****';
|
||||
|
||||
$field = new ReadonlyField($this->name, $this->title ? $this->title : _t('Member.PASSWORD'), $stars);
|
||||
$field->setForm($this->form);
|
||||
return $field;
|
||||
}
|
||||
}
|
||||
|
@ -47,4 +47,4 @@ class PasswordField extends FormField {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -706,6 +706,9 @@ class Member extends DataObject {
|
||||
public function getCMSFields() {
|
||||
$locale = ($this->Locale) ? $this->Locale : i18n::get_locale();
|
||||
|
||||
$password = new ConfirmedPasswordField('Password', 'Password');
|
||||
$password->setCanBeEmpty(true);
|
||||
|
||||
$fields = new FieldSet(
|
||||
//new TextField("Salutation", "Title"),
|
||||
new HeaderField(_t('Member.PERSONALDETAILS', "Personal Details", PR_MEDIUM, 'Headline for formfields')),
|
||||
@ -719,11 +722,7 @@ class Member extends DataObject {
|
||||
i18n::get_existing_translations(),
|
||||
$locale
|
||||
),
|
||||
new PasswordField("Password", _t('Member.PASSWORD'))
|
||||
//new TextareaField("Address","Address"),
|
||||
//new TextField("JobTitle", "Job Title"),
|
||||
//new TextField( "Organisation", "Organisation" ),
|
||||
//new OptionsetField("HTMLEmail","Mail Format", array( 1 => 'HTML', 0 => 'Text only' ) )
|
||||
$password
|
||||
);
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
Loading…
Reference in New Issue
Block a user