-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change prefilled data banner logic for single page form
We're going to introduce a single page form with some prefilled data not displayed. Because of this, old behavior used to displayed the banner, without prefilled data, which is a bit confusing. This new way has some default too: we have to manually add the new partial on each single page view. I think the tradeoff is OK because we'll copy some views, which embed this partial. Moreover it'll be some generator in the future. Ref #500 (comment)
- Loading branch information
Showing
9 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
app/views/authorization_request_forms/api_entreprise_through_editor.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
app/views/authorization_request_forms/api_particulier_through_editor.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...orization_request_forms/api_particulier_through_editor_without_contact_technique.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<%= authorization_request_form(@authorization_request) do |f| %> | ||
<%= render partial: 'authorization_request_forms/shared/prefilled_banner_for_single_page_form' %> | ||
|
||
<div class="fr-mt-4w"> | ||
<%= render partial: "authorization_requests/shared/organization_and_applicant" %> | ||
</div> | ||
|
||
<%= render partial: "authorization_request_forms/shared/block_titles", locals: { f: f, block_name: :scopes } %> | ||
<%= render partial: 'authorization_request_forms/shared/scopes', locals: { f: } %> | ||
<%= render partial: "authorization_request_forms/shared/block_titles", locals: { f: f, block_name: :contacts } %> | ||
<%= render partial: 'authorization_request_forms/shared/contacts', locals: { f: } %> | ||
<%= render partial: 'authorization_request_forms/shared/submit_buttons', locals: { f: } %> | ||
<% end %> |
4 changes: 4 additions & 0 deletions
4
app/views/authorization_request_forms/shared/_prefilled_banner_for_single_page_form.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<% if @authorization_request.prefilled_data?(@authorization_request.data.keys) && !within_edit? && !within_summary? %> | ||
<%= render partial: "authorization_request_forms/shared/prefilled_banner" %> | ||
<% end %> | ||
|
2 changes: 2 additions & 0 deletions
2
app/views/authorization_request_forms/shared/single_page/_api_service_national.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters