mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
IMPR: Login form bootstrap styling improvement
This commit is contained in:
parent
49cebd4050
commit
ab0c9e362a
@ -20,13 +20,25 @@ class SiteMemberLoginForm extends MemberLoginForm
|
|||||||
parent::__construct($controller, $authenticatorClass, $name, $fields, $actions, $checkCurrentUser);
|
parent::__construct($controller, $authenticatorClass, $name, $fields, $actions, $checkCurrentUser);
|
||||||
|
|
||||||
$fields = $this->Fields();
|
$fields = $this->Fields();
|
||||||
|
$actions = $this->Actions();
|
||||||
|
|
||||||
$email = $fields->fieldByName('Email');
|
$email = $fields->fieldByName('Email');
|
||||||
|
if ($email) {
|
||||||
$email->setAttribute('autocomplete', 'email');
|
$email->setAttribute('autocomplete', 'email');
|
||||||
|
}
|
||||||
|
|
||||||
$pass = $fields->fieldByName('Password');
|
$pass = $fields->fieldByName('Password');
|
||||||
|
if($pass) {
|
||||||
//$pass->setAttribute('autocomplete', 'current-password');
|
//$pass->setAttribute('autocomplete', 'current-password');
|
||||||
$pass->setAutofocus(true);
|
$pass->setAutofocus(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$btn = $actions->fieldByName('action_doLogin');
|
||||||
|
if($btn) {
|
||||||
|
$btn->setUseButtonTag(true);
|
||||||
|
$btn->setButtonContent('<i class="fas fa-check"></i> '.$btn->Title());
|
||||||
|
$btn->addExtraClass('btn-lg');
|
||||||
|
}
|
||||||
|
|
||||||
if (Director::isLive()) {
|
if (Director::isLive()) {
|
||||||
$this->enableSpamProtection();
|
$this->enableSpamProtection();
|
||||||
|
Loading…
Reference in New Issue
Block a user