Administrateur password, remove one level of indirection

This commit is contained in:
simon lehericey 2019-08-12 13:41:43 +02:00
parent f7528f70ac
commit 7e78b7d62d
2 changed files with 17 additions and 19 deletions

View file

@ -3,4 +3,20 @@
- content_for :footer do
= render partial: "root/footer"
= render 'shared/password/new', object: @administrateur, controller: 'administrateurs/activate', test_password_strength: administrateurs_password_test_strength_path
.container.devise-container
.one-column-centered
= form_for @administrateur, url: { controller: 'administrateurs/activate', action: :create }, html: { class: "form" } do |f|
%br
%h1
Choix du mot de passe
= f.hidden_field :reset_password_token, value: @administrateur.reset_password_token
= f.label :email, "Email"
= f.text_field :email, disabled: true
= f.label :password do
Mot de passe
= render partial: 'shared/password/edit_password', locals: { form: f, controller: 'administrateurs/passwords' }
= f.submit 'Continuer', class: 'button large primary expand', id: "submit-password", data: { disable_with: "Envoi..." }

View file

@ -1,18 +0,0 @@
.container.devise-container
.one-column-centered
- controller_action = defined?(action) ? action : :create
= form_for object, url: { controller: controller, action: controller_action }, html: { class: "form" } do |f|
%br
%h1
Choix du mot de passe
= f.hidden_field :reset_password_token, value: object.reset_password_token
= f.label :email, "Email"
= f.text_field :email, disabled: true
= f.label :password do
Mot de passe
= render partial: 'shared/password/edit_password', locals: { form: f, controller: controller }
= f.submit 'Continuer', class: 'button large primary expand', id: "submit-password", data: { disable_with: "Envoi..." }