mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT When MemberLoginForm controller page has loaded, focus on the Email input field so the user doesn't have to focus the field themselves. Ticket #3418
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70846 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
65e3917fef
commit
e80355eac1
@ -37,6 +37,17 @@ class MemberLoginForm extends LoginForm {
|
|||||||
Requirements::css($customCSS);
|
Requirements::css($customCSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Requirements::javascript(THIRDPARTY_DIR . '/javascript/jquery/jquery.js');
|
||||||
|
|
||||||
|
// Focus on the email input when the page is loaded
|
||||||
|
Requirements::customScript("
|
||||||
|
(function($){
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#Email input').focus();
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
");
|
||||||
|
|
||||||
if(isset($_REQUEST['BackURL'])) {
|
if(isset($_REQUEST['BackURL'])) {
|
||||||
$backURL = $_REQUEST['BackURL'];
|
$backURL = $_REQUEST['BackURL'];
|
||||||
} else {
|
} else {
|
||||||
@ -231,5 +242,4 @@ class MemberLoginForm extends LoginForm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user