2019-07-02 18:15:03 +02:00
|
|
|
|
= render partial: 'new_administrateur/breadcrumbs',
|
|
|
|
|
locals: { steps: [link_to('Tableau de bord', tableau_de_bord_helper_path),
|
|
|
|
|
'Profil'] }
|
|
|
|
|
|
|
|
|
|
#profil-page.container
|
|
|
|
|
%h1 Profil
|
|
|
|
|
|
2021-10-26 13:22:51 +02:00
|
|
|
|
- if @waiting_merge_emails.any?
|
|
|
|
|
.card
|
|
|
|
|
.card-title Demande de fusion de comptes
|
|
|
|
|
%p
|
|
|
|
|
Acceptez-vous d’absorber le compte de
|
|
|
|
|
%span.email-address= @waiting_merge_emails.join(', ')
|
|
|
|
|
|
|
|
|
|
= link_to 'Refuser la fusion', refuse_merge_path, method: :post, class: 'button', data: { confirm: "Confirmez-vous le refus ?" }
|
|
|
|
|
= link_to 'Accepter la fusion', accept_merge_path, method: :post, class: 'button', data: { confirm: "Confirmez-vous la fusion des comptes ?" }
|
|
|
|
|
|
2019-07-08 10:40:50 +02:00
|
|
|
|
.card
|
|
|
|
|
.card-title Coordonnées
|
2019-07-09 16:21:45 +02:00
|
|
|
|
%p
|
|
|
|
|
Votre email est actuellement
|
|
|
|
|
%span.email-address= current_user.email
|
2021-10-26 10:12:15 +02:00
|
|
|
|
|
2021-10-26 16:18:12 +02:00
|
|
|
|
- waiting_email = current_user.unconfirmed_email || current_user.requested_merge_into&.email
|
2021-10-26 10:12:15 +02:00
|
|
|
|
|
2021-10-26 16:18:12 +02:00
|
|
|
|
- if waiting_email.present?
|
2021-10-26 10:12:15 +02:00
|
|
|
|
%p.mb-4
|
|
|
|
|
Changement en attente :
|
2021-10-26 16:18:12 +02:00
|
|
|
|
%span.email-address= waiting_email
|
2021-10-26 10:12:15 +02:00
|
|
|
|
%br
|
|
|
|
|
Pour finaliser votre changement d’adresse, vérifiez vos emails et cliquez sur le lien de confirmation.
|
2019-07-08 10:40:50 +02:00
|
|
|
|
|
2021-10-18 12:03:13 +02:00
|
|
|
|
- if current_user.instructeur?
|
|
|
|
|
%p.mb-4
|
|
|
|
|
= t('.email_explications_html',
|
|
|
|
|
contact_email: CONTACT_EMAIL,
|
|
|
|
|
application_name: APPLICATION_NAME,
|
|
|
|
|
legit_admin_domains: LEGIT_ADMIN_DOMAINS.join(', '))
|
|
|
|
|
|
|
|
|
|
= form_for @current_user, url: update_email_path, method: :patch, html: { class: 'form' } do |f|
|
|
|
|
|
= f.email_field :email, value: nil, placeholder: 'Nouvelle adresse email', required: true
|
|
|
|
|
= f.submit "Changer mon adresse", class: 'button primary'
|
2019-07-08 10:40:50 +02:00
|
|
|
|
|
2021-09-20 13:57:55 +02:00
|
|
|
|
- if !instructeur_signed_in?
|
|
|
|
|
.card
|
|
|
|
|
.card-title= t('.transfer_title')
|
|
|
|
|
= t('.transfer_explication_html')
|
|
|
|
|
|
|
|
|
|
= form_tag transfer_all_dossiers_path, class: 'form' do
|
|
|
|
|
= email_field_tag :next_owner, nil, required: true
|
|
|
|
|
= submit_tag "Transférer tous mes dossiers", class: 'button primary', data: { confirm: t('.transfer_confirmation') }
|
|
|
|
|
|
|
|
|
|
- if @waiting_transfers.any?
|
|
|
|
|
.card.warning
|
|
|
|
|
.card-title= t('.waiting_transfers')
|
|
|
|
|
%ul
|
|
|
|
|
- @waiting_transfers.each do |email, nb_dossier|
|
|
|
|
|
%li= t('.one_waiting_transfer', email: email, count: nb_dossier)
|
2021-09-20 13:26:57 +02:00
|
|
|
|
|
2019-07-02 18:15:03 +02:00
|
|
|
|
- if current_administrateur.present?
|
|
|
|
|
.card
|
2019-07-08 11:43:02 +02:00
|
|
|
|
.card-title Jeton d’identification de l’API (token)
|
2020-07-22 10:32:20 +02:00
|
|
|
|
%p Ce jeton est nécessaire pour effectuer des appels vers l’API de #{APPLICATION_NAME}.
|
2019-07-02 18:15:03 +02:00
|
|
|
|
|
|
|
|
|
- if defined?(@token)
|
|
|
|
|
%p Jeton : <b>#{@token}</b>
|
|
|
|
|
%p Pour des raisons de sécurité, ce jeton ne sera plus ré-affiché, notez-le bien.
|
|
|
|
|
|
|
|
|
|
- else
|
2019-07-08 11:43:02 +02:00
|
|
|
|
%p Pour des raisons de sécurité, nous ne pouvons vous l’afficher que lors de sa génération.
|
|
|
|
|
%p Attention, si vous avez déjà des applications qui utilisent votre jeton, le regénérer bloquera leurs accès à l’API.
|
2019-07-02 18:15:03 +02:00
|
|
|
|
|
|
|
|
|
= link_to "Regénérer et afficher mon jeton",
|
|
|
|
|
renew_api_token_path,
|
|
|
|
|
method: :post,
|
|
|
|
|
class: "button primary",
|
2019-07-08 11:43:02 +02:00
|
|
|
|
data: { confirm: "Confirmez-vous la regénération de votre jeton ? Les applications qui l’utilisent actuellement seront bloquées.",
|
2019-07-02 18:15:03 +02:00
|
|
|
|
disable: true }
|