mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added password meter based on zxcvbn
Maybe we will use a different package later, as this one is very big...
This commit is contained in:
parent
20826daa18
commit
ecded8af93
7 changed files with 170 additions and 1 deletions
|
@ -122,4 +122,22 @@
|
|||
|
||||
{% block part_select_widget %}
|
||||
{{ form_widget(form.autocomplete) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block password_widget %}
|
||||
{# If password_estimator setting is not set render it like normal #}
|
||||
{% if password_estimator %}
|
||||
<div {{ stimulus_controller('elements/password_strength_estimate') }}>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text d-none">
|
||||
<span class="badge badge-primary" {{ stimulus_target('elements/password_strength_estimate', 'badge') }}></span>
|
||||
</span>
|
||||
{{- parent() -}}
|
||||
</div>
|
||||
|
||||
<span class="form-text text-warning" {{ stimulus_target('elements/password_strength_estimate', 'warning') }}></span>
|
||||
</div>
|
||||
{% else %}
|
||||
{{- parent() -}}
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue