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 6380004
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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 "Retour à l'accueil", 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

0 comments on commit 6380004

Please sign in to comment.