Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
ba5c2c4d
Commit
ba5c2c4d
authored
May 26, 2013
by
Alex Pott
Browse files
Issue
#1955282
by LewisNyman: Disable Autocapitalize and Autocorrect on user login forms.
parent
bfd507f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/user/lib/Drupal/user/AccountFormController.php
View file @
ba5c2c4d
...
...
@@ -40,7 +40,8 @@ public function form(array $form, array &$form_state) {
'#maxlength'
=>
USERNAME_MAX_LENGTH
,
'#description'
=>
t
(
'Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'
),
'#required'
=>
TRUE
,
'#attributes'
=>
array
(
'class'
=>
array
(
'username'
),
'autocomplete'
=>
'off'
),
'#attributes'
=>
array
(
'class'
=>
array
(
'username'
),
'autocorrect'
=>
'off'
,
'autocomplete'
=>
'off'
,
'autocapitalize'
=>
'off'
,
'spellcheck'
=>
'false'
),
'#default_value'
=>
(
!
$register
?
$account
->
name
:
''
),
'#access'
=>
(
$register
||
(
$user
->
uid
==
$account
->
uid
&&
user_access
(
'change own username'
))
||
$admin
),
'#weight'
=>
-
10
,
...
...
core/modules/user/user.module
View file @
ba5c2c4d
...
...
@@ -1225,6 +1225,9 @@ function user_login_form($form, &$form_state) {
'#description'
=>
t
(
'Enter your @s username.'
,
array
(
'@s'
=>
config
(
'system.site'
)
->
get
(
'name'
))),
'#required'
=>
TRUE
,
'#attributes'
=>
array
(
'autocorrect'
=>
'off'
,
'autocapitalize'
=>
'off'
,
'spellcheck'
=>
'false'
,
'autofocus'
=>
'autofocus'
,
),
);
...
...
core/modules/user/user.pages.inc
View file @
ba5c2c4d
...
...
@@ -29,6 +29,12 @@ function user_pass() {
'#size'
=>
60
,
'#maxlength'
=>
max
(
USERNAME_MAX_LENGTH
,
EMAIL_MAX_LENGTH
),
'#required'
=>
TRUE
,
'#attributes'
=>
array
(
'autocorrect'
=>
'off'
,
'autocapitalize'
=>
'off'
,
'spellcheck'
=>
'false'
,
'autofocus'
=>
'autofocus'
,
),
);
// Allow logged in users to request this also.
if
(
$user
->
uid
>
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment