|
|
|
@ -56,23 +56,24 @@
|
|
|
|
|
:name, |
|
|
|
|
legend: { text: "Does the organisation hold its own stock?", size: "m" } %> |
|
|
|
|
|
|
|
|
|
<%= f.govuk_collection_radio_buttons :group_member, |
|
|
|
|
[OpenStruct.new(id: true, name: "Yes"), OpenStruct.new(id: false, name: "No")], |
|
|
|
|
:id, |
|
|
|
|
:name, |
|
|
|
|
legend: { text: "Is this organisation part of a housing provider group structure?", size: "m" }, |
|
|
|
|
"data-action": "change->group-member#toggleGroupSelect" %> |
|
|
|
|
|
|
|
|
|
<% group_organisation_options = Organisation.visible.map { |org| OpenStruct.new(id: org.id, name: org.name) } %> |
|
|
|
|
|
|
|
|
|
<div data-group-member-target="groupSelect"> |
|
|
|
|
<%= f.govuk_collection_select :group, |
|
|
|
|
group_organisation_options, |
|
|
|
|
:id, |
|
|
|
|
:name, |
|
|
|
|
label: { text: "Search for an organisation that is part of the same group as this organisation", size: "m" }, |
|
|
|
|
"data-controller": %w[accessible-autocomplete conditional-filter organisations] %> |
|
|
|
|
</div> |
|
|
|
|
<%= f.govuk_radio_buttons_fieldset :group_member, |
|
|
|
|
legend: { text: "Is this organisation part of a housing provider group structure?", size: "m" } do %> |
|
|
|
|
<%= f.govuk_radio_button :group_member, true, |
|
|
|
|
label: { text: "Yes" }, |
|
|
|
|
"data-controller": "conditional-question", |
|
|
|
|
"data-action": "click->conditional-question#displayConditional", |
|
|
|
|
"data-info": { conditional_questions: { group: [true] }, type: "organisation" }.to_json do %> |
|
|
|
|
<%= f.govuk_collection_select :group, |
|
|
|
|
group_organisation_options, |
|
|
|
|
:id, |
|
|
|
|
:name, |
|
|
|
|
label: { text: "Search for an organisation that is part of the same group as this organisation", size: "m" }, |
|
|
|
|
"data-controller": %w[accessible-autocomplete conditional-filter] %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= f.govuk_radio_button :group_member, false, label: { text: "No" } %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% profit_options = [ |
|
|
|
|
OpenStruct.new(id: 1, name: "Non-profit"), |
|
|
|
|