Browse Source
* Add new organisation address fields to merge requests * Add new organisation address page * Add new organisation telephone number placeholder page * close the divpull/1608/head
kosiakkatrina
2 years ago
committed by
GitHub
7 changed files with 135 additions and 2 deletions
@ -1,5 +1,33 @@ |
|||||||
<% content_for :before_content do %> |
<% content_for :before_content do %> |
||||||
<% title = "New organisation address" %> |
<% title = "New organisation address" %> |
||||||
<% content_for :title, title %> |
<% content_for :title, title %> |
||||||
<%= govuk_back_link href: new_organisation_name_merge_request_path(id: @merge_request) %> |
<%= govuk_back_link href: new_organisation_name_merge_request_path(@merge_request) %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<%= form_with model: @merge_request, url: merge_request_path, method: :patch do |f| %> |
||||||
|
<%= f.govuk_error_summary %> |
||||||
|
|
||||||
|
<h2 class="govuk-heading-l">What is <%= @merge_request.new_organisation_name.possessive %> address?</h2> |
||||||
|
<div class="govuk-grid-row"> |
||||||
|
<div class="govuk-grid-column-two-thirds-from-desktop"> |
||||||
|
<%= f.govuk_text_field :new_organisation_address_line1, |
||||||
|
label: { text: "Address line 1", size: "m" }, |
||||||
|
autocomplete: "address-line1" %> |
||||||
|
|
||||||
|
<%= f.govuk_text_field :new_organisation_address_line2, |
||||||
|
label: { text: "Address line 2", size: "m" }, |
||||||
|
autocomplete: "address-line2" %> |
||||||
|
|
||||||
|
<%= f.govuk_text_field :new_organisation_postcode, |
||||||
|
label: { text: "Postcode", size: "m" }, |
||||||
|
autocomplete: "postal-code", |
||||||
|
width: 10 %> |
||||||
|
|
||||||
|
<%= f.hidden_field :page, value: "new_organisation_address" %> |
||||||
|
<div class="govuk-button-group"> |
||||||
|
<%= f.govuk_submit %> |
||||||
|
<%= govuk_link_to("Skip for now", new_organisation_telephone_number_merge_request_path(@merge_request)) %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
<% end %> |
<% end %> |
||||||
|
@ -0,0 +1,5 @@ |
|||||||
|
<% content_for :before_content do %> |
||||||
|
<% title = "New organisation telephone number" %> |
||||||
|
<% content_for :title, title %> |
||||||
|
<%= govuk_back_link href: new_organisation_address_merge_request_path(@merge_request) %> |
||||||
|
<% end %> |
@ -0,0 +1,9 @@ |
|||||||
|
class AddNewOrganisationAddress < ActiveRecord::Migration[7.0] |
||||||
|
def change |
||||||
|
change_table :merge_requests, bulk: true do |t| |
||||||
|
t.column :new_organisation_address_line1, :string |
||||||
|
t.column :new_organisation_address_line2, :string |
||||||
|
t.column :new_organisation_postcode, :string |
||||||
|
end |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue