From f7aa3ac61a6d6fd6ec926665f66e3241bf0e495a Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 9 Apr 2008 11:29:29 +0000 Subject: [PATCH] Merged revisions 51249 via svnmerge from svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq ........ r51249 | ischommer | 2008-03-18 11:58:39 +1300 (Tue, 18 Mar 2008) | 1 line added $titleConfirmField as fallback to localized default ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52413 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/ConfirmedPasswordField.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/forms/ConfirmedPasswordField.php b/forms/ConfirmedPasswordField.php index 485faac1c..33d508bfd 100644 --- a/forms/ConfirmedPasswordField.php +++ b/forms/ConfirmedPasswordField.php @@ -60,12 +60,18 @@ class ConfirmedPasswordField extends FormField { * @param mixed $value * @param Form $form * @param boolean $showOnClick + * @param string $titleConfirmField Alternate title (not localizeable) */ - function __construct($name, $title = null, $value = "", $form = null, $showOnClick = false) { + function __construct($name, $title = null, $value = "", $form = null, $showOnClick = false, $titleConfirmField = null) { // naming with underscores to prevent values from actually being saved somewhere $this->children = new FieldSet( - new PasswordField("{$name}[_Password]", (isset($title)) ? $title : _t('Member.PASSWORD')), - new PasswordField("{$name}[_ConfirmPassword]",_t('Member.CONFIRMPASSWORD', 'Confirm Password')) + new PasswordField( + "{$name}[_Password]", + (isset($title)) ? $title : _t('Member.PASSWORD')), + new PasswordField( + "{$name}[_ConfirmPassword]", + (isset($titleConfirmField)) ? $titleConfirmField : _t('Member.CONFIRMPASSWORD', 'Confirm Password') + ) ); $this->showOnClick = $showOnClick;