You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.9 KiB
36 lines
1.9 KiB
2 years ago
|
<%= form_with model: @organisation_relationship, url: stock_owners_organisation_path, method: "post", local: true do |f| %>
|
||
2 years ago
|
<% if current_user.support? %>
|
||
|
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %>
|
||
|
<%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %>
|
||
2 years ago
|
<h2 class="govuk-visually-hidden">Add Stock Owner</h2>
|
||
2 years ago
|
<%= govuk_back_link(href: :back) %>
|
||
2 years ago
|
<%= render partial: "organisations/headings", locals: { main: "What is the name of this organisation's stock owner?", sub: nil } %>
|
||
|
<p class="govuk-body">Start typing to search for a stock owner</p>
|
||
2 years ago
|
<% else %>
|
||
|
<% content_for :before_content do %>
|
||
|
<%= govuk_back_link(href: :back) %>
|
||
|
<% end %>
|
||
2 years ago
|
<%= render partial: "organisations/headings", locals: { main: "What is the name of your stock owner?", sub: nil } %>
|
||
|
<p class="govuk-body">Start typing to search for your stock owner</p>
|
||
2 years ago
|
<% end %>
|
||
|
<% answer_options = { "" => "Select an option" } %>
|
||
|
<% @organisations.each do |organisation| %>
|
||
|
<% answer_options[organisation[0]] = organisation[1] %>
|
||
|
<% end %>
|
||
|
<%= render partial: "organisation_relationships/related_organisation_select_question", locals: {
|
||
2 years ago
|
field: :parent_organisation_id,
|
||
2 years ago
|
question: Form::Question.new("", { "answer_options" => answer_options }, nil),
|
||
|
f:,
|
||
|
} %>
|
||
|
<%= f.govuk_submit "Add" %>
|
||
2 years ago
|
<%= govuk_details(summary_text: "Can't find the stock owner you're looking for?") do %>
|
||
2 years ago
|
<ul class="govuk-list govuk-list--bullet">
|
||
|
<li>Double check the spelling and try again</li>
|
||
|
<li>Type the first few letters to see the suggestions</li>
|
||
|
<li>If you still can't find it,
|
||
|
<%= govuk_link_to("contact the DLUHC service desk", "https://digital.dclg.gov.uk/jira/servicedesk/customer/portal/4/group/21", rel: "noreferrer noopener", target: "_blank") %>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<% end %>
|
||
|
<% end %>
|