Skip to content

Commit 9c4de09

Browse files
committed
fix system
1 parent 9e03e7a commit 9c4de09

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

decidim-system/app/commands/decidim/system/update_organization.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def organization
4545

4646
def save_organization
4747
organization.name = form.name
48+
organization.short_name = form.short_name
4849
organization.host = form.host
4950
organization.secondary_hosts = form.clean_secondary_hosts
5051
organization.force_users_to_authenticate_before_access_organization = form.force_users_to_authenticate_before_access_organization

decidim-system/app/controllers/decidim/system/organizations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def default_params
8282
host: request.host,
8383
organization_admin_name: current_admin.email.split("@")[0],
8484
organization_admin_email: current_admin.email,
85-
available_locales: Decidim.available_locales.map(&:to_s),
85+
available_locales: [Decidim.default_locale.to_s],
8686
default_locale: Decidim.default_locale,
8787
users_registration_mode: "enabled"
8888
}

decidim-system/spec/commands/decidim/system/update_organization_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module System
5858
organization = Organization.last
5959

6060
expect(translated(organization.name)).to eq("Gotham City")
61+
expect(translated(organization.short_name)).to eq("GothamCity")
6162
expect(organization.host).to eq("decide.example.org")
6263
expect(organization.secondary_hosts).to contain_exactly("foo.example.org", "bar.example.org")
6364
expect(organization.users_registration_mode).to eq("existing")

decidim-system/spec/system/organizations_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
expect(find(:xpath, "//input[@id='organization_organization_admin_name']").value).to eq(admin.email.split("@")[0])
3434
expect(find(:xpath, "//input[@id='organization_organization_admin_email']").value).to eq(admin.email)
3535
within "table" do
36-
expect(all("input[type=checkbox]")).to all(be_checked)
36+
expect(find(:xpath, "//input[@id='organization_available_locales_#{Decidim.default_locale}']")).to be_checked
3737
expect(find(:xpath, "//input[@name='organization[default_locale]']", match: :first)).to be_checked
3838
end
3939
expect(find(:xpath, "//input[@name='organization[users_registration_mode]']", match: :first).value).to eq("enabled")

0 commit comments

Comments
 (0)