Skip to content

Commit 98b555b

Browse files
Merge pull request #1202 from alphagov/fix-file-remove-component
Fix file remove component
2 parents 6ea3803 + b66f449 commit 98b555b

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
<h1 class="govuk-heading-l"><%= t('forms.remove_file.show.title') %></h1>
2-
3-
<p class="govuk-inset-text">
4-
<%= question.original_filename %>
5-
</p>
61

72
<%= form_with model: @remove_input, url: @remove_file_url, method: :delete do |form| %>
8-
<div class="govuk-grid-row">
9-
<div class="govuk-grid-column-two-thirds">
10-
<% if @remove_input&.errors.any? %>
11-
<%= form.govuk_error_summary %>
12-
<% end %>
3+
<% if @remove_input&.errors.any? %>
4+
<%= form.govuk_error_summary %>
5+
<% end %>
6+
7+
<h1 class="govuk-heading-l"><%= t('forms.remove_file.show.title') %></h1>
8+
9+
<p class="govuk-inset-text">
10+
<%= question.original_filename %>
11+
</p>
1312

14-
<%= form.govuk_collection_radio_buttons :remove,
15-
@remove_input.values, ->(option) { option }, ->(option) { t('helpers.label.remove_input.options.' + "#{option}") },
16-
legend: { text: t('forms.remove_file.show.radios_legend')},
17-
inline: true %>
13+
<%= form.govuk_collection_radio_buttons :remove,
14+
@remove_input.values, ->(option) { option }, ->(option) { t('helpers.label.remove_input.options.' + "#{option}") },
15+
legend: { text: t('forms.remove_file.show.radios_legend')},
16+
inline: true %>
1817

19-
<%= form.govuk_submit %>
20-
</div>
21-
</div>
18+
<%= form.govuk_submit %>
2219
<% end %>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.review-file-summary-list {
2+
.govuk-summary-list__key {
3+
width: 20%;
4+
}
5+
}

app/components/question/file_review_component/view.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<%= t('forms.review_file.show.check_file') %>
77
</h2>
88

9-
<%= govuk_summary_list do |summary_list|
9+
<%= govuk_summary_list(html_attributes: { class: 'review-file-summary-list' }) do |summary_list|
1010
summary_list.with_row do |row|
1111
row.with_key { t('forms.review_file.show.your_file') }
1212
row.with_value { question.original_filename }

app/frontend/entrypoints/application.scss

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ $govuk-global-styles: true;
44
@import "pkg:govuk-frontend";
55
@import "pkg:dfe-autocomplete";
66
@import "../../components/form_header_component/";
7+
@import "../../components/question/file_review_component/";
78
@import "../styles/app-panel";

0 commit comments

Comments
 (0)