mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 09:05:46 +00:00
IMPR: i18n for AJAX security forms
This commit is contained in:
parent
505609bfef
commit
ecf6afd33a
@ -72,12 +72,19 @@ class AjaxControllerEx extends Extension
|
||||
self::_processFields($form);
|
||||
|
||||
//$form->addExtraClass('ajax-form');
|
||||
$form->setLegend('Log in to your service account');
|
||||
|
||||
if ($form->get_protector()) {
|
||||
$form->enableSpamProtection();
|
||||
}
|
||||
|
||||
|
||||
$form->setLegend(
|
||||
_t(
|
||||
'SilverStripe\\Security\\Security.LOGINFORMLEGEND',
|
||||
'Log in'
|
||||
)
|
||||
);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
@ -94,13 +101,24 @@ class AjaxControllerEx extends Extension
|
||||
|
||||
self::_processFields($form);
|
||||
$form->addExtraClass('ajax-form');
|
||||
$form->setLegend('I\'ve lost my password');
|
||||
$form->Actions()->first()->setTitle('Submit');
|
||||
$form->Actions()->first()->setTitle(
|
||||
_t(
|
||||
'SilverStripe\\Security\\Security.SUBMITTITLE',
|
||||
'Submit'
|
||||
)
|
||||
);
|
||||
|
||||
if ($form->get_protector()) {
|
||||
$form->enableSpamProtection();
|
||||
}
|
||||
|
||||
$form->setLegend(
|
||||
_t(
|
||||
'SilverStripe\\Security\\Security.LOSTPASSWORDFORMLEGEND',
|
||||
'I\'ve lost my password'
|
||||
)
|
||||
);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user