Browse Source
* Add new organisation name column * Update new organisation name page * Refactor validate_response * Add placeholder new_organisation_address page * Add existing organisation name validation * Refactor error messages * Extract some validations to the model * Update which field we add the errors topull/1602/head
kosiakkatrina
2 years ago
committed by
GitHub
11 changed files with 168 additions and 43 deletions
@ -1,7 +0,0 @@
|
||||
<% content_for :before_content do %> |
||||
<% title = "Tell us if your organisation is merging" %> |
||||
<% content_for :title, title %> |
||||
<%= govuk_back_link href: absorbing_organisation_merge_request_path(id: @merge_request) %> |
||||
<% end %> |
||||
|
||||
Provide new org name |
@ -0,0 +1,5 @@
|
||||
<% content_for :before_content do %> |
||||
<% title = "New organisation address" %> |
||||
<% content_for :title, title %> |
||||
<%= govuk_back_link href: new_organisation_name_merge_request_path(id: @merge_request) %> |
||||
<% end %> |
@ -0,0 +1,19 @@
|
||||
<% content_for :before_content do %> |
||||
<% title = "New organisation name" %> |
||||
<% content_for :title, title %> |
||||
<%= govuk_back_link href: absorbing_organisation_merge_request_path(id: @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 the new organisation called?</h2> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds-from-desktop"> |
||||
<%= f.govuk_text_field :new_organisation_name, label: nil %> |
||||
<%= f.hidden_field :page, value: "new_organisation_name" %> |
||||
<%= f.govuk_submit %> |
||||
<% end %> |
||||
</div> |
||||
</div> |
@ -0,0 +1,5 @@
|
||||
class AddNewOrganisationName < ActiveRecord::Migration[7.0] |
||||
change_table :merge_requests, bulk: true do |t| |
||||
t.column :new_organisation_name, :string |
||||
end |
||||
end |
Loading…
Reference in new issue