Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/hub/organizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def activate_all_role_param

def organization_form_params
params.require(:hub_organization_form).permit(
:name, :is_independent, :states, :coalition_id, :timezone, :accepts_itin_applicants, :capacity_limit, :allows_greeters, source_parameters_attributes: [:_destroy, :id, :code]
:name, :is_independent, :states, :coalition_id, :timezone, :accepts_itin_applicants, :capacity_limit, :allows_greeters, :national_overflow_location, source_parameters_attributes: [:_destroy, :id, :code]
)
end

Expand Down
2 changes: 1 addition & 1 deletion app/forms/hub/organization_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class OrganizationForm < Form

attr_accessor :organization

set_attributes_for :organization, :name, :coalition_id, :accepts_itin_applicants, :timezone, :capacity_limit, :allows_greeters
set_attributes_for :organization, :name, :coalition_id, :accepts_itin_applicants, :timezone, :capacity_limit, :allows_greeters, :national_overflow_location
set_attributes_for :state_routing_targets, :states
set_attributes_for :organization_synthetic_attributes, :is_independent

Expand Down
1 change: 1 addition & 0 deletions app/views/hub/organizations/_organization_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

<%= f.hub_checkbox(:allows_greeters, t('hub.organizations.form.allows_greeters'), options: { checked_value: true, unchecked_value: false, **local_assigns[:additional_options] }) %> <!-- local_assigns[:additional_options] sets default to true for new orgs -->
<%= f.hub_checkbox(:accepts_itin_applicants, "Accepts ITIN applicants", options: { checked_value: true, unchecked_value: false }) %>
<%= f.hub_checkbox(:national_overflow_location, "Allows National Routing", options: { checked_value: true, unchecked_value: false }) %>
<div>
<%= f.continue t("general.save") %>
</div>
5 changes: 5 additions & 0 deletions spec/forms/hub/organization_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
capacity_limit: 9001,
allows_greeters: true,
accepts_itin_applicants: true,
national_overflow_location: true,
is_independent: "yes",
states: "CA"
}.merge(extra_params)
Expand All @@ -117,6 +118,7 @@
capacity_limit: 9001,
allows_greeters: true,
accepts_itin_applicants: true,
national_overflow_location: true,
is_independent: "yes",
states: "CA"
}
Expand All @@ -140,6 +142,7 @@
capacity_limit: "-5",
allows_greeters: true,
accepts_itin_applicants: true,
national_overflow_location: true,
is_independent: "yes",
states: "CA"
}
Expand All @@ -163,6 +166,7 @@
capacity_limit: "-5",
allows_greeters: true,
accepts_itin_applicants: true,
national_overflow_location: true,
is_independent: "yes",
states: "CA"
}
Expand All @@ -185,6 +189,7 @@
expect(organization.capacity_limit).to eq(9001)
expect(organization.allows_greeters).to eq true
expect(organization.accepts_itin_applicants).to eq true
expect(organization.national_overflow_location).to eq true
end

context "when is_independent is yes" do
Expand Down
Loading