From 1f2785f20ad74fb170e494ee0224bfff372ee37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Delmaire?= Date: Tue, 23 Apr 2024 17:43:05 +0200 Subject: [PATCH] AuthorizationRequests#new: enhance view for unicity constraint with back button --- app/assets/stylesheets/application.css | 4 ++++ app/views/authorization_requests/new.html.erb | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 420357be1..28cc8d06d 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -26,6 +26,10 @@ h3.with-icon img { display: inline!important; } +.flex { + display: flex!important; +} + .header__logo { max-width: 7rem; padding: 1rem; diff --git a/app/views/authorization_requests/new.html.erb b/app/views/authorization_requests/new.html.erb index 6a5edf9eb..caa7ece52 100644 --- a/app/views/authorization_requests/new.html.erb +++ b/app/views/authorization_requests/new.html.erb @@ -74,11 +74,10 @@ <% if policy(authorization_request_form).new? %> <%= start_authorization_request_form(authorization_request_form) %> <% else %> -

- <%= t('.unicity_warning.description', authorization_request_form_name: authorization_request_form.name_with_authorization) %> -

- - <%= start_authorization_request_form(authorization_request_form, disabled: true) %> +
+ <%= 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) %> +
<% end %>

<% end %>