amelioration(a11y.invites): focus sur la liste des invitations lorsqu'on ajoute un invite a un dossier
This commit is contained in:
parent
ddc04a03a4
commit
c3fd555e6c
6 changed files with 17 additions and 15 deletions
|
@ -11,4 +11,4 @@
|
||||||
- else
|
- else
|
||||||
= t('views.invites.dropdown.invite_to_edit')
|
= t('views.invites.dropdown.invite_to_edit')
|
||||||
- menu.with_form do
|
- menu.with_form do
|
||||||
= render partial: "invites/form", locals: { dossier: dossier, invites: invites }
|
= render partial: "invites/form", locals: { dossier: dossier, invites: invites, morphing: morphing }
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#invites-form
|
#invites-form
|
||||||
- if invites.present?
|
- if invites.present?
|
||||||
%h4= t('views.invites.form.invite_to_participate')
|
#invite-list{ morphing ? { tabindex: "-1" } : {} }
|
||||||
%ul
|
%h4= t('views.invites.form.invite_to_participate')
|
||||||
- invites.each do |invite|
|
%ul
|
||||||
%li
|
- invites.each do |invite|
|
||||||
= invite.email
|
%li
|
||||||
%small{ 'data-turbo': 'true' }
|
= invite.email
|
||||||
= link_to t('views.invites.form.withdraw_permission'), invite_path(invite), data: { turbo_method: :delete, turbo_confirm: t('views.invites.form.want_to_withdraw_permission') }
|
%small{ 'data-turbo': 'true' }
|
||||||
|
= link_to t('views.invites.form.withdraw_permission'), invite_path(invite), data: { turbo_method: :delete, turbo_confirm: t('views.invites.form.want_to_withdraw_permission') }
|
||||||
|
|
||||||
%p= t('views.invites.form.edit_dossier')
|
%p= t('views.invites.form.edit_dossier')
|
||||||
- if dossier.brouillon?
|
- if dossier.brouillon?
|
||||||
%p= t('views.invites.form.submit_dossier_yourself')
|
%p= t('views.invites.form.submit_dossier_yourself')
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
= turbo_stream.replace_all '.invite-user-action', partial: 'invites/dropdown', locals: { dossier: @dossier }
|
= turbo_stream.replace_all '.invite-user-action', partial: 'invites/dropdown', locals: { dossier: @dossier, morphing: true }
|
||||||
= turbo_stream.focus 'invite_email'
|
= turbo_stream.focus 'invite-list'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- if @dossier.present?
|
- if @dossier.present?
|
||||||
= turbo_stream.replace_all '.invite-user-action', partial: 'invites/dropdown', locals: { dossier: @dossier }
|
= turbo_stream.replace_all '.invite-user-action', partial: 'invites/dropdown', locals: { dossier: @dossier, morphing: true }
|
||||||
- if @dossier.invites.empty?
|
- if @dossier.invites.empty?
|
||||||
= turbo_stream.focus 'invite_email'
|
= turbo_stream.focus 'invite-list'
|
||||||
- else
|
- else
|
||||||
= turbo_stream.focus_all '#invites-form ul a:first-child'
|
= turbo_stream.focus 'invite_email'
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
||||||
- elsif current_user.owns?(dossier)
|
- elsif current_user.owns?(dossier)
|
||||||
.header-actions
|
.header-actions
|
||||||
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
= render partial: 'invites/dropdown', locals: { dossier: dossier, morphing: false }
|
||||||
|
|
||||||
- unless dossier.read_only?
|
- unless dossier.read_only?
|
||||||
= render partial: 'users/dossiers/identity_dropdown', locals: { dossier: dossier }
|
= render partial: 'users/dossiers/identity_dropdown', locals: { dossier: dossier }
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
||||||
- elsif current_user.owns?(dossier)
|
- elsif current_user.owns?(dossier)
|
||||||
.header-actions
|
.header-actions
|
||||||
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
= render partial: 'invites/dropdown', locals: { dossier: dossier, morphing: false }
|
||||||
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
||||||
= link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm',
|
= link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm',
|
||||||
title: { label: t('views.users.dossiers.show.header.edit_dossier_title') }
|
title: { label: t('views.users.dossiers.show.header.edit_dossier_title') }
|
||||||
|
|
Loading…
Reference in a new issue