Add safe password checklist

This commit is contained in:
Jay Trees 2022-04-08 14:18:59 +02:00
parent 6c47875d78
commit 894126ef36
9 changed files with 15629 additions and 14090 deletions

View file

@ -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

File diff suppressed because one or more lines are too long

9
semantic/dist/components/step.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12560
semantic/dist/semantic.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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',

View file

@ -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>