app: remove former password complexity views
The old component is now unused and ca be removed.
This commit is contained in:
parent
e5f449b595
commit
4a71b1d202
6 changed files with 0 additions and 91 deletions
|
@ -1,40 +0,0 @@
|
|||
@import "colors";
|
||||
@import "constants";
|
||||
|
||||
$strength-bg: #EEEEEE;
|
||||
$strength-color-0: $lighter-red;
|
||||
$strength-color-1: #FF5000;
|
||||
$strength-color-2: $orange;
|
||||
$strength-color-3: #FFD000;
|
||||
$strength-color-4: $green;
|
||||
|
||||
.password-strength {
|
||||
margin-top: -24px;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
background: $strength-bg;
|
||||
display: block;
|
||||
margin-bottom: $default-spacer;
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
|
||||
&.strength-0 {
|
||||
background: linear-gradient(to right, $strength-color-0 00%, $strength-bg 20%);
|
||||
}
|
||||
|
||||
&.strength-1 {
|
||||
background: linear-gradient(to right, $strength-color-1 20%, $strength-bg 40%);
|
||||
}
|
||||
|
||||
&.strength-2 {
|
||||
background: linear-gradient(to right, $strength-color-2 40%, $strength-bg 60%);
|
||||
}
|
||||
|
||||
&.strength-3 {
|
||||
background: linear-gradient(to right, $strength-color-3 60%, $strength-bg 80%);
|
||||
}
|
||||
|
||||
&.strength-4 {
|
||||
background: $strength-color-4;
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
- content_for(:title, 'Changement de mot de passe')
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: 'root/footer'
|
||||
|
||||
.container.devise-container
|
||||
.one-column-centered
|
||||
= devise_error_messages!
|
||||
|
||||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :patch, class: 'form' }) do |f|
|
||||
|
||||
%h1 Changement de mot de passe
|
||||
|
||||
= f.hidden_field :reset_password_token, value: params[:token]
|
||||
|
||||
= f.label 'Nouveau mot de passe'
|
||||
|
||||
= render partial 'shared/password/edit_password', locals: { form: f, controller: controller }
|
||||
|
||||
= f.submit 'Changer le mot de passe', class: 'button large primary expand', id: "submit-password", data: { disable_with: "Envoi..." }
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
= form.password_field :password, autofocus: true, autocomplete: 'off', placeholder: 'Mot de passe', data: { remote: true, url: url_for(controller: controller, action: 'test_strength') }
|
||||
|
||||
#strength-bar.password-strength
|
||||
|
||||
|
||||
.explication
|
||||
#strength-label{ style: 'font-weight: bold' }
|
||||
Inscrivez un mot de passe.
|
||||
Une courte phrase avec ponctuation peut être un mot de passe très sécurisé.
|
||||
|
|
@ -1 +0,0 @@
|
|||
#strength-bar.password-strength{ class: "strength-#{@length < @min_length ? @score/2 : @score}" }
|
|
@ -1,16 +0,0 @@
|
|||
#strength-label{ style: 'font-weight: bold' }
|
||||
- if @length > 0
|
||||
- if @length < @min_length
|
||||
Le mot de passe doit faire au moins #{@min_length} caractères.
|
||||
- else
|
||||
- case @score
|
||||
- when 0..1
|
||||
Mot de passe très vulnérable.
|
||||
- when 2...@min_complexity
|
||||
Mot de passe vulnérable.
|
||||
- when @min_complexity...4
|
||||
Mot de passe acceptable. Vous pouvez valider...<br> ou améliorer votre mot de passe.
|
||||
- else
|
||||
Félicitations ! Mot de passe suffisamment fort et sécurisé.
|
||||
- else
|
||||
Inscrivez un mot de passe.
|
|
@ -1,3 +0,0 @@
|
|||
<%= render_to_element('#strength-label', partial: 'shared/password/password_strength_label', outer: true) %>
|
||||
<%= render_to_element('#strength-bar', partial: 'shared/password/password_strength', outer: true) %>
|
||||
<%= raw("document.querySelector('#submit-password').disabled = #{@score < @min_complexity || @length < @min_length};") %>
|
Loading…
Add table
Reference in a new issue