Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
945e7605
Commit
945e7605
authored
Apr 17, 2012
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1459164
by Kevin Morse, droplet: Use test() to match string for BOOL comparison .
parent
b3e2c8b4
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/system/system.js
+1
-1
1 addition, 1 deletion
core/modules/system/system.js
core/modules/user/user.js
+4
-4
4 additions, 4 deletions
core/modules/user/user.js
with
5 additions
and
5 deletions
core/modules/system/system.js
+
1
−
1
View file @
945e7605
...
@@ -105,7 +105,7 @@ Drupal.behaviors.dateTime = {
...
@@ -105,7 +105,7 @@ Drupal.behaviors.dateTime = {
// Attach keyup handler to custom format inputs.
// Attach keyup handler to custom format inputs.
$
(
context
).
find
(
'
input
'
+
source
).
once
(
'
date-time
'
).
keyup
(
function
()
{
$
(
context
).
find
(
'
input
'
+
source
).
once
(
'
date-time
'
).
keyup
(
function
()
{
var
input
=
$
(
this
);
var
input
=
$
(
this
);
var
url
=
fieldSettings
.
lookup
+
(
fieldSettings
.
lookup
.
match
(
/
\?
q=/
)
?
'
&format=
'
:
'
?format=
'
)
+
encodeURIComponent
(
input
.
val
());
var
url
=
fieldSettings
.
lookup
+
(
/
\?
q=/
.
test
(
fieldSettings
.
lookup
)
?
'
&format=
'
:
'
?format=
'
)
+
encodeURIComponent
(
input
.
val
());
$
.
getJSON
(
url
,
function
(
data
)
{
$
.
getJSON
(
url
,
function
(
data
)
{
$
(
suffix
).
empty
().
append
(
'
'
+
fieldSettings
.
text
+
'
: <em>
'
+
data
+
'
</em>
'
);
$
(
suffix
).
empty
().
append
(
'
'
+
fieldSettings
.
text
+
'
: <em>
'
+
data
+
'
</em>
'
);
});
});
...
...
This diff is collapsed.
Click to expand it.
core/modules/user/user.js
+
4
−
4
View file @
945e7605
...
@@ -97,10 +97,10 @@ Drupal.behaviors.password = {
...
@@ -97,10 +97,10 @@ Drupal.behaviors.password = {
Drupal
.
evaluatePasswordStrength
=
function
(
password
,
translate
)
{
Drupal
.
evaluatePasswordStrength
=
function
(
password
,
translate
)
{
var
indicatorText
,
indicatorColor
,
weaknesses
=
0
,
strength
=
100
,
msg
=
[];
var
indicatorText
,
indicatorColor
,
weaknesses
=
0
,
strength
=
100
,
msg
=
[];
var
hasLowercase
=
password
.
match
(
/
[
a-z
]
+/
);
var
hasLowercase
=
/
[
a-z
]
+/
.
test
(
password
);
var
hasUppercase
=
password
.
match
(
/
[
A-Z
]
+/
);
var
hasUppercase
=
/
[
A-Z
]
+/
.
test
(
password
);
var
hasNumbers
=
password
.
match
(
/
[
0-9
]
+/
);
var
hasNumbers
=
/
[
0-9
]
+/
.
test
(
password
);
var
hasPunctuation
=
password
.
match
(
/
[^
a-zA-Z0-9
]
+/
);
var
hasPunctuation
=
/
[^
a-zA-Z0-9
]
+/
.
test
(
password
);
// If there is a username edit box on the page, compare password to that, otherwise
// If there is a username edit box on the page, compare password to that, otherwise
// use value from the database.
// use value from the database.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment