Skip to content

Commit

Permalink
Improve spacing in suitability form
Browse files Browse the repository at this point in the history
This is to match the designs.
  • Loading branch information
thomasleese committed Jul 24, 2024
1 parent d88854b commit 49cb984
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/javascript/suitability_record_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function SuitabilityRecordForm(params) {
function (event) {
let newElement = input.cloneNode(true);
newElement.querySelector("input").value = "";
newElement.classList.add("govuk-!-margin-bottom-2");
container.appendChild(newElement);

let removeButton = document.createElement("a");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= f.govuk_text_field :aliases, multiple: true %>
<% else %>
<% @form.aliases.each_with_index do |value, index| %>
<%= f.govuk_text_field :aliases, multiple: true, value: %>
<%= f.govuk_text_field :aliases, multiple: true, value:, form_group: { class: index > 0 ? "govuk-!-margin-bottom-2" : "" } %>

<% if index > 0 %>
<%= govuk_button_link_to "Remove alias", "#", class: "app-remove-alias-button", secondary: true %>
Expand All @@ -27,7 +27,7 @@
<%= f.govuk_email_field :emails, multiple: true %>
<% else %>
<% @form.emails.each_with_index do |value, index| %>
<%= f.govuk_email_field :emails, multiple: true, value: %>
<%= f.govuk_email_field :emails, multiple: true, value:, form_group: { class: index > 0 ? "govuk-!-margin-bottom-2" : "" } %>

<% if index > 0 %>
<%= govuk_button_link_to "Remove email address", "#", class: "app-remove-email-button", secondary: true %>
Expand All @@ -43,7 +43,7 @@
<%= f.govuk_text_field :references, multiple: true %>
<% else %>
<% @form.references.each_with_index do |value, index| %>
<%= f.govuk_text_field :references, multiple: true, value: %>
<%= f.govuk_text_field :references, multiple: true, value:, form_group: { class: index > 0 ? "govuk-!-margin-bottom-2" : "" } %>

<% if index > 0 %>
<%= govuk_button_link_to "Remove application reference", "#", class: "app-remove-reference-button", secondary: true %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<% if @suitability_record.archived? %>
<%= f.govuk_submit "Set to active", secondary: true %>
<% else %>
<h2 class="govuk-heading-m">Update record</h2>
<h2 class="govuk-heading-m govuk-!-padding-top-6">Update record</h2>

<%= render "form_fields", f: %>

Expand Down

0 comments on commit 49cb984

Please sign in to comment.