Add safe password checklist
This commit is contained in:
parent
6c47875d78
commit
894126ef36
9 changed files with 15629 additions and 14090 deletions
|
@ -27,31 +27,32 @@
|
|||
"grid",
|
||||
|
||||
"button",
|
||||
"calendar",
|
||||
"card",
|
||||
"divider",
|
||||
"dimmer",
|
||||
"divider",
|
||||
"dropdown",
|
||||
"form",
|
||||
"header",
|
||||
"icon",
|
||||
"image",
|
||||
"input",
|
||||
"label",
|
||||
"loader",
|
||||
"list",
|
||||
"list",
|
||||
"loader",
|
||||
"menu",
|
||||
"message",
|
||||
"modal",
|
||||
"popup",
|
||||
"progress",
|
||||
"segment",
|
||||
"sidebar",
|
||||
"statistic",
|
||||
"step",
|
||||
"tab",
|
||||
"text",
|
||||
"toast",
|
||||
"form",
|
||||
"menu",
|
||||
"calendar",
|
||||
"popup",
|
||||
"message",
|
||||
"list",
|
||||
"tab",
|
||||
|
||||
"api",
|
||||
"transition"
|
||||
|
|
700
semantic/dist/components/step.css
vendored
Normal file
700
semantic/dist/components/step.css
vendored
Normal file
File diff suppressed because one or more lines are too long
9
semantic/dist/components/step.min.css
vendored
Normal file
9
semantic/dist/components/step.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
16370
semantic/dist/semantic.css
vendored
16370
semantic/dist/semantic.css
vendored
File diff suppressed because one or more lines are too long
12560
semantic/dist/semantic.js
vendored
12560
semantic/dist/semantic.js
vendored
File diff suppressed because it is too large
Load diff
2
semantic/dist/semantic.min.css
vendored
2
semantic/dist/semantic.min.css
vendored
File diff suppressed because one or more lines are too long
2
semantic/dist/semantic.min.js
vendored
2
semantic/dist/semantic.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -25,6 +25,39 @@ $(function() {
|
|||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '[name="user-password"]', function() {
|
||||
var password = $(this).val();
|
||||
|
||||
if (password.length > 8) {
|
||||
$('.step.long')
|
||||
.removeClass('disabled')
|
||||
.addClass('completed');
|
||||
} else {
|
||||
$('.step.long')
|
||||
.removeClass('completed')
|
||||
.addClass('disabled');
|
||||
}
|
||||
|
||||
var hasSpecialCharacter = false;
|
||||
|
||||
password.split('').forEach(character => {
|
||||
if (character.match(/\W/)) {
|
||||
hasSpecialCharacter = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
if (hasSpecialCharacter) {
|
||||
$('.step.special')
|
||||
.addClass('completed')
|
||||
.removeClass('disabled');
|
||||
} else {
|
||||
$('.step.special')
|
||||
.removeClass('completed')
|
||||
.addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$('.ui.dropdown.channel').dropdown();
|
||||
$('.ui.dropdown.locale').dropdown({
|
||||
sortSelect : 'natural',
|
||||
|
|
|
@ -228,6 +228,30 @@ $page->navigation();
|
|||
title="<?= __('Save') ?>"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h3 class="ui header"><?= __('Safe password checklist') ?></h3>
|
||||
|
||||
<div class="ui basic fitted segment">
|
||||
<div class="ui three steps">
|
||||
<div class="disabled step long">
|
||||
<i class="times icon"></i>
|
||||
<div class="content">
|
||||
<div class="title"><?= __('Long') ?></div>
|
||||
<div class="description"><?= __('Over eight characters in length.') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="disabled step special">
|
||||
|
||||
<i class="times icon"></i>
|
||||
<div class="content">
|
||||
<div class="title"><?= __('Special') ?></div>
|
||||
<div class="description"><?= __('Contains special characters.') ?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue