Layout
This commit is contained in:
parent
6ced107403
commit
ee9c918ee8
15 changed files with 152 additions and 45 deletions
|
@ -108,6 +108,10 @@ module DossierHelper
|
|||
end
|
||||
|
||||
def demandeur_dossier(dossier)
|
||||
if dossier.procedure.for_individual? && dossier.for_tiers?
|
||||
return t('shared.dossiers.beneficiaire', mandataire: dossier.mandataire_full_name, beneficiaire: "#{dossier&.individual&.prenom} #{dossier&.individual&.nom}")
|
||||
end
|
||||
|
||||
if dossier.procedure.for_individual?
|
||||
return "#{dossier&.individual&.nom} #{dossier&.individual&.prenom}"
|
||||
end
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
%legend.fr-fieldset__legend#new-account-legend
|
||||
%h2.fr-h6= I18n.t('views.users.sessions.new.subtitle')
|
||||
|
||||
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
|
||||
- c.body do
|
||||
= t('views.users.sessions.new.for_tiers_alert')
|
||||
|
||||
.fr-fieldset__element
|
||||
%p.fr-text--sm= t('utils.mandatory_champs')
|
||||
|
||||
|
|
|
@ -27,10 +27,11 @@
|
|||
= link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-py-3v fr-btn fr-btn--tertiary-no-outline'
|
||||
|
||||
|
||||
= render partial: "shared/dossiers/user_infos", locals: { user_deleted: dossier.user_deleted?, email: dossier.user_email_for(:display) }
|
||||
= render partial: "shared/dossiers/user_infos", locals: { user_deleted: dossier.user_deleted?, email: dossier.user_email_for(:display), for_tiers: dossier.for_tiers? }
|
||||
|
||||
|
||||
- if dossier.individual.present?
|
||||
= render partial: "shared/dossiers/identite_individual", locals: { individual: dossier.individual }
|
||||
= render partial: "shared/dossiers/identite_individual", locals: { dossier: dossier }
|
||||
|
||||
- if dossier.etablissement.present?
|
||||
.fr-mt-1w.fr-mb-4w.fr-px-2w
|
||||
|
|
|
@ -1,16 +1,27 @@
|
|||
- if dossier.for_tiers?
|
||||
|
||||
= render Dossiers::RowShowComponent.new(label: t('views.users.dossiers.identite.mandataire')) do |c|
|
||||
- c.with_value do
|
||||
%p= t('views.users.dossiers.identite.act_as_mandataire', mandataire: dossier.mandataire_full_name)
|
||||
|
||||
= render Dossiers::RowShowComponent.new(label: t('views.users.dossiers.identite.civility')) do |c|
|
||||
- c.with_value do
|
||||
%p= individual.gender
|
||||
%p= dossier.individual.gender
|
||||
|
||||
= render Dossiers::RowShowComponent.new(label: t('views.users.dossiers.identite.first_name')) do |c|
|
||||
- c.with_value do
|
||||
%p= individual.prenom
|
||||
%p= dossier.individual.prenom
|
||||
|
||||
= render Dossiers::RowShowComponent.new(label: t('views.users.dossiers.identite.last_name')) do |c|
|
||||
- c.with_value do
|
||||
%p= individual.nom
|
||||
%p= dossier.individual.nom
|
||||
|
||||
- if individual.birthdate.present?
|
||||
- if dossier.individual.birthdate.present?
|
||||
= render Dossiers::RowShowComponent.new(label: t('views.users.dossiers.identite.birthdate')) do |c|
|
||||
- c.with_value do
|
||||
%p= try_format_date(individual.birthdate)
|
||||
%p= try_format_date(dossier.individual.birthdate)
|
||||
|
||||
- if dossier.for_tiers? && dossier.individual.email?
|
||||
= render Dossiers::RowShowComponent.new(label: t('activerecord.attributes.individual.email')) do |c|
|
||||
- c.with_value do
|
||||
%p= dossier.individual.email
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
= render Dossiers::RowShowComponent.new(label: 'Email', profile: @profile) do |c|
|
||||
= render Dossiers::RowShowComponent.new(label: for_tiers ? t('views.users.dossiers.identite.mandataire_email') : 'Email', profile: @profile) do |c|
|
||||
- c.with_value do
|
||||
= user_deleted ? "#{email} (l’usager a supprimé son compte)" : email
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
- else
|
||||
= dossier.procedure.libelle
|
||||
|
||||
- if demandeur_dossier(dossier).present?
|
||||
%p.fr-icon--sm.fr-icon-user-line
|
||||
= demandeur_dossier(dossier)
|
||||
%p.fr-icon--sm.fr-icon-user-line
|
||||
= demandeur_dossier(dossier)
|
||||
|
||||
- if dossier.hidden_by_user?
|
||||
%p.fr-icon--sm.fr-icon-delete-line
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
= render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: { class: ['dossier-show', 'edit-identity-action'] }, menu_options: { class:['edit-identity-content'] }) do |menu|
|
||||
- menu.with_button_inner_html do
|
||||
= t("views.shared.dossiers.demande.my_identity")
|
||||
= t("views.shared.dossiers.demande.individual_identity")
|
||||
|
||||
- menu.with_form do
|
||||
- if dossier.procedure.for_individual
|
||||
= render partial: "shared/dossiers/identite_individual", locals: { individual: dossier.individual }
|
||||
= render partial: "shared/dossiers/identite_individual", locals: { dossier: dossier }
|
||||
|
||||
= link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-btn fr-btn--secondary fr-btn--sm fr-my-1w'
|
||||
|
||||
|
@ -12,4 +12,3 @@
|
|||
= render partial: "shared/dossiers/identite_entreprise", locals: { etablissement: dossier.etablissement, short_identity: true, profile: "usager" }
|
||||
|
||||
= link_to t('views.shared.dossiers.demande.edit_siret'), siret_dossier_path(dossier), class: 'fr-btn fr-btn--secondary fr-btn--sm fr-my-1w'
|
||||
|
||||
|
|
|
@ -3,37 +3,97 @@
|
|||
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: @dossier }
|
||||
|
||||
- if !dossier_submission_is_closed?(@dossier)
|
||||
= form_for @dossier.individual, url: update_identite_dossier_path(@dossier), html: { class: "form" } do |f|
|
||||
= form_for @dossier, url: update_identite_dossier_path(@dossier), html: { class: "form", "data-controller" => "for-tiers" } do |f|
|
||||
|
||||
%fieldset#radio-rich-hint.fr-fieldset{ "aria-labelledby" => "radio-rich-hint-legend radio-rich-hint-messages" }
|
||||
%legend#radio-rich-hint-legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
||||
Ce dossier est
|
||||
|
||||
%fieldset.fr-fieldset
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
||||
%h2.fr-h4= t('views.users.dossiers.identite.identity_data')
|
||||
.fr-fieldset__element
|
||||
%fieldset.fr-fieldset
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
||||
= t('activerecord.attributes.individual.gender')
|
||||
= render EditableChamp::AsteriskMandatoryComponent.new
|
||||
.fr-fieldset__element
|
||||
.fr-radio-group
|
||||
= f.radio_button :gender, Individual::GENDER_FEMALE, required: true, id: "identite_champ_radio_#{Individual::GENDER_FEMALE}"
|
||||
%label.fr-label{ for: "identite_champ_radio_#{Individual::GENDER_FEMALE}" }
|
||||
= Individual.human_attribute_name('gender.female')
|
||||
.fr-fieldset__element
|
||||
.fr-radio-group
|
||||
= f.radio_button :gender, Individual::GENDER_MALE, required: true, id: "identite_champ_radio_#{Individual::GENDER_MALE}"
|
||||
%label.fr-label{ for: "identite_champ_radio_#{Individual::GENDER_MALE}" }
|
||||
= Individual.human_attribute_name('gender.male')
|
||||
.fr-radio-group.fr-radio-rich
|
||||
= f.radio_button :for_tiers, false, required: true, id: "radio-self-manage", "data-action" => "click->for-tiers#toggleFieldRequirements", "data-for-tiers-target" => "forTiers"
|
||||
%label.fr-label{ for: "radio-self-manage" }
|
||||
= t('activerecord.attributes.dossier.for_tiers.false')
|
||||
.fr-radio-rich__img
|
||||
%span.fr-icon-user-fill
|
||||
.fr-fieldset__element
|
||||
.fr-radio-group.fr-radio-rich
|
||||
= f.radio_button :for_tiers, true, required: true, id: "radio-tiers-manage", "data-action" => "click->for-tiers#toggleFieldRequirements", "data-for-tiers-target" => "forTiers"
|
||||
%label.fr-label{ for: "radio-tiers-manage" }
|
||||
= t('activerecord.attributes.dossier.for_tiers.true')
|
||||
.fr-radio-rich__img
|
||||
%span.fr-icon-parent-fill
|
||||
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :prenom, opts: { autocomplete: 'given-name' })
|
||||
%div{ "data-for-tiers-target" => "mandataireBlock" }
|
||||
.fr-alert.fr-alert--info.fr-mb-2w
|
||||
%p.fr-notice__text= t('views.users.dossiers.identite.callout_text')
|
||||
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :nom, opts: { autocomplete: 'family-name' })
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
||||
%h2.fr-h4= t('views.users.dossiers.identite.self_title')
|
||||
|
||||
- if @dossier.procedure.ask_birthday?
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :mandataire_first_name, opts: { "data-for-tiers-target" => "mandataireFirstName", id: 'mandataire_first_name' }) do |c|
|
||||
- c.with_label do
|
||||
= t('activerecord.attributes.dossier.mandataire_first_name')
|
||||
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :mandataire_last_name, opts: { "data-for-tiers-target" => "mandataireLastName", id: 'mandataire_last_name' }) do |c|
|
||||
- c.with_label do
|
||||
= t('activerecord.attributes.dossier.mandataire_last_name')
|
||||
|
||||
= f.fields_for :individual do |individual|
|
||||
%fieldset.fr-fieldset
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend{ "data-for-tiers-target" => "mandataireTitle" }
|
||||
%h2.fr-h4= t('views.users.dossiers.identite.self_title')
|
||||
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend.hidden{ "data-for-tiers-target" => "beneficiaireTitle" }
|
||||
%h2.fr-h4= t('views.users.dossiers.identite.beneficiaire_title')
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :birthdate, input_type: :date_field,
|
||||
opts: { placeholder: 'Format : AAAA-MM-JJ', max: Date.today.iso8601, min: "1900-01-01", autocomplete: 'bday' })
|
||||
%fieldset.fr-fieldset
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
||||
= t('activerecord.attributes.individual.gender')
|
||||
= render EditableChamp::AsteriskMandatoryComponent.new
|
||||
.fr-fieldset__element
|
||||
.fr-radio-group
|
||||
= individual.radio_button :gender, Individual::GENDER_FEMALE, required: true, id: "identite_champ_radio_#{Individual::GENDER_FEMALE}"
|
||||
%label.fr-label{ for: "identite_champ_radio_#{Individual::GENDER_FEMALE}" }
|
||||
= Individual.human_attribute_name('gender.female')
|
||||
.fr-fieldset__element
|
||||
.fr-radio-group
|
||||
= individual.radio_button :gender, Individual::GENDER_MALE, required: true, id: "identite_champ_radio_#{Individual::GENDER_MALE}"
|
||||
%label.fr-label{ for: "identite_champ_radio_#{Individual::GENDER_MALE}" }
|
||||
= Individual.human_attribute_name('gender.male')
|
||||
|
||||
.fr-fieldset__element
|
||||
= f.submit t('views.users.dossiers.identite.continue'), class: "fr-btn fr-btn--lg fr-my-2w"
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text
|
||||
= render Dsfr::InputComponent.new(form: individual, attribute: :prenom, opts: { autocomplete: 'given-name', id: 'indiv_first_name' })
|
||||
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text
|
||||
= render Dsfr::InputComponent.new(form: individual, attribute: :nom, opts: { autocomplete: 'family-name', id: 'indiv_last_name' })
|
||||
|
||||
.width-100{ "data-for-tiers-target" => "beneficiaireNotificationBlock" }
|
||||
|
||||
.fr-fieldset__element
|
||||
%fieldset.fr-fieldset
|
||||
%legend.fr-fieldset__legend--regular.fr-fieldset__legend
|
||||
= t('activerecord.attributes.individual.notification_method')
|
||||
= render EditableChamp::AsteriskMandatoryComponent.new
|
||||
|
||||
- Individual.notification_methods.each do |method, _|
|
||||
.fr-fieldset__element
|
||||
.fr-radio-group
|
||||
= individual.radio_button :notification_method, method, id: "notification_method_#{method}", "data-action" => "for-tiers#toggleFieldRequirements", "data-for-tiers-target" => "notificationMethod"
|
||||
%label.fr-label{ for: "notification_method_#{method}" }
|
||||
= t("activerecord.attributes.individual.notification_methods.#{method}")
|
||||
|
||||
|
||||
.fr-fieldset__element.fr-fieldset__element--short-text.hidden{ "data-for-tiers-target" => "email" }
|
||||
= render Dsfr::InputComponent.new(form: individual, attribute: :email)
|
||||
|
||||
|
||||
- if @dossier.procedure.ask_birthday?
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: individual, attribute: :birthdate, input_type: :date_field,
|
||||
opts: { placeholder: 'Format : AAAA-MM-JJ', max: Date.today.iso8601, min: "1900-01-01", autocomplete: 'bday' })
|
||||
|
||||
.fr-fieldset__element
|
||||
= f.submit t('views.users.dossiers.identite.continue'), class: "fr-btn fr-btn--lg fr-my-2w"
|
||||
|
|
|
@ -341,7 +341,7 @@ en:
|
|||
demande:
|
||||
requester_identity: "Identity of the requester"
|
||||
requester_identity_updated_at: "updated on %{date}"
|
||||
my_identity: "My identity"
|
||||
individual_identity: "Your identity"
|
||||
form: "Form"
|
||||
edit_siret: "Edit SIRET"
|
||||
edit_identity: "Edit identity data"
|
||||
|
@ -392,7 +392,11 @@ en:
|
|||
dossiers:
|
||||
archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months"
|
||||
identite:
|
||||
identity_data: Identity data
|
||||
self_title: Your identity
|
||||
mandataire: Mandatary
|
||||
mandataire_email: Mandatary email
|
||||
callout_text: "You are acting as a proxy for a principal, either professionally (such as accountant, lawyer) or personally (family). Make sure to respect the conditions of Articles 1984 to 1990 of the Civil Code."
|
||||
beneficiaire_title: "Identity of the beneficiary"
|
||||
identity_siret: Identify your establishment
|
||||
civility: Civility
|
||||
first_name: First Name
|
||||
|
@ -404,6 +408,7 @@ en:
|
|||
annuaire_link_title: Search for a SIRET number in the Companies Directory
|
||||
siret_loading: Information retrieval…
|
||||
continue: Continue
|
||||
act_as_mandataire: '%{mandataire} act on behalf of the beneficiary :'
|
||||
merci:
|
||||
thanks: Thank you!
|
||||
dossier_send_l1: Your file on the procedure
|
||||
|
@ -504,6 +509,7 @@ en:
|
|||
state_civil_servant: Are you a state civil servant?
|
||||
connect_with_agent_connect: Visit our dedicated page
|
||||
subtitle: "Sign in with my account"
|
||||
for_tiers_alert: If you are completing a forme for someone else, you must use your own credentials.
|
||||
passwords:
|
||||
edit:
|
||||
subtitle: Change password
|
||||
|
|
|
@ -342,7 +342,7 @@ fr:
|
|||
en_construction: "Date de dépôt du dossier"
|
||||
requester_identity: "Identité du demandeur"
|
||||
requester_identity_updated_at: "modifiée le %{date}"
|
||||
my_identity: "Mon identité"
|
||||
individual_identity: "Votre identité"
|
||||
form: "Sections du formulaire"
|
||||
edit_siret: "Modifier le SIRET"
|
||||
edit_identity: "Modifier l’identité"
|
||||
|
@ -397,7 +397,11 @@ fr:
|
|||
dossiers:
|
||||
archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire"
|
||||
identite:
|
||||
identity_data: Identité du demandeur
|
||||
self_title: Votre identité
|
||||
mandataire: Mandataire
|
||||
mandataire_email: Email du mandataire
|
||||
callout_text: Vous agissez en tant que mandataire, soit professionnellement (comme expert-comptable, avocat) soit personnellement (famille). Assurez-vous de respecter les conditions des Articles 1984 à 1990 du Code civil.
|
||||
beneficiaire_title: Identité du bénéficiaire
|
||||
identity_siret: Identifier votre établissement
|
||||
civility: Civilité
|
||||
first_name: Prénom
|
||||
|
@ -409,6 +413,7 @@ fr:
|
|||
annuaire_link_title: Rechercher un numéro de SIRET sur l’Annuaire des Entreprises
|
||||
siret_loading: Récupération des informations…
|
||||
continue: Continuer
|
||||
act_as_mandataire: '%{mandataire}'
|
||||
merci:
|
||||
thanks: Merci !
|
||||
dossier_send_l1: Votre dossier sur la démarche
|
||||
|
@ -509,6 +514,7 @@ fr:
|
|||
state_civil_servant: Vous êtes agent de la fonction publique d’État ?
|
||||
connect_with_agent_connect: Accédez à notre page dédiée
|
||||
subtitle: "Se connecter avec son compte"
|
||||
for_tiers_alert: Si vous remplissez un dossier pour un tiers, vous devez uitliser vos propres identifiants.
|
||||
passwords:
|
||||
edit:
|
||||
subtitle: Changement de mot de passe
|
||||
|
|
|
@ -13,6 +13,11 @@ fr:
|
|||
state: "État"
|
||||
autorisation_donnees: Acceptation des CGU
|
||||
pending_correction: Demande de correction
|
||||
mandataire_first_name: Prénom
|
||||
mandataire_last_name: Nom
|
||||
for_tiers:
|
||||
false: Pour vous
|
||||
true: "Pour un bénéficiaire : membre de la famille, proche, mandant..."
|
||||
dossier/state: &state
|
||||
brouillon: "Brouillon"
|
||||
en_construction: "En construction"
|
||||
|
|
|
@ -6,6 +6,11 @@ en:
|
|||
nom: Last name
|
||||
prenom: First name
|
||||
birthdate: Date de naissance
|
||||
email: Email
|
||||
notification_method: "Notify beneficiary :"
|
||||
notification_methods:
|
||||
email: By e-mail
|
||||
no_notification: No notification
|
||||
individual/gender:
|
||||
female: Ms
|
||||
male: Mr
|
||||
|
|
|
@ -6,6 +6,11 @@ fr:
|
|||
nom: Nom
|
||||
prenom: Prénom
|
||||
birthdate: Date de naissance
|
||||
email: Email
|
||||
notification_method: "Notifier le bénéficiaire :"
|
||||
notification_methods:
|
||||
email: Par e-mail
|
||||
no_notification: Pas de notification
|
||||
individual/gender:
|
||||
female: Madame
|
||||
male: Monsieur
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
en:
|
||||
shared:
|
||||
dossiers:
|
||||
beneficiaire: '%{beneficiaire}, file fill by %{mandataire}'
|
||||
france_connect_informations:
|
||||
details_no_name: "The file was submitted by a FranceConnect account."
|
||||
details: "The file was submitted by the account of %{name}."
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
fr:
|
||||
shared:
|
||||
dossiers:
|
||||
beneficiaire: '%{beneficiaire}, dossier rempli par %{mandataire}'
|
||||
france_connect_informations:
|
||||
details_no_name: "Le dossier a été déposé par un compte FranceConnect."
|
||||
details: "Le dossier a été déposé par le compte de %{name}."
|
||||
|
|
Loading…
Reference in a new issue