Skip to content

Commit

Permalink
AuthorizationRequests#new: enhance view for unicity constraint with b…
Browse files Browse the repository at this point in the history
…ack button
  • Loading branch information
skelz0r committed Apr 23, 2024
1 parent 977e4f0 commit 92263e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ h3.with-icon img {
display: inline!important;
}

.flex {
display: flex!important;
}

.header__logo {
max-width: 7rem;
padding: 1rem;
Expand Down
9 changes: 4 additions & 5 deletions app/views/authorization_requests/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@
<% if policy(authorization_request_form).new? %>
<%= start_authorization_request_form(authorization_request_form) %>
<% else %>
<p class="fr-alert fr-alert--warning fr-my-3w">
<%= t('.unicity_warning.description', authorization_request_form_name: authorization_request_form.name_with_authorization) %>
</p>

<%= start_authorization_request_form(authorization_request_form, disabled: true) %>
<div class="flex">
<%= link_to t('.back_to_dashboard'), dashboard_path, class: %w[fr-btn fr-btn--secondary fr-mr-2w] %>
<%= start_authorization_request_form(authorization_request_form, disabled: true) %>
</div>
<% end %>
</p>
<% end %>
Expand Down
3 changes: 1 addition & 2 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ fr:
title: &start_new_habilitation_title Démarrer une nouvelle habilitation pour %{authorization_name}
current_form: Via le formulaire " %{authorization_request_form_name} "
current_form_with_editor: Via le formulaire " %{authorization_request_form_name} " relatif à l'éditeur " %{editor_name} "
unicity_warning:
description: Vous ne pouvez posséder qu'une seule habilitation pour %{authorization_request_form_name}.
back_to_dashboard: Retour à l'accueil
organization:
start_text: "Vous êtes sur le point de démarrer une nouvelle demande d'habilitation pour le compte de <strong>%{organization_raison_sociale}</strong> (numéro de siret: <a href=\"https://annuaire-entreprises.data.gouv.fr/etablissement/%{organization_siret}\" target=\"_blank\">%{organization_siret}</a>)."
callout:
Expand Down

0 comments on commit 92263e8

Please sign in to comment.