Commit 15c2ef25aa2002cc5d4054ed9c8327e44f4822df
1 parent
f61d6f06
Exists in
master
and in
29 other branches
rails3: move zip_code, city, state and country settings to organization
Showing
3 changed files
with
3 additions
and
2 deletions
Show diff stats
app/models/community.rb
@@ -9,7 +9,6 @@ class Community < Organization | @@ -9,7 +9,6 @@ class Community < Organization | ||
9 | N_('Language') | 9 | N_('Language') |
10 | 10 | ||
11 | settings_items :language | 11 | settings_items :language |
12 | - settings_items :zip_code, :city, :state, :country | ||
13 | 12 | ||
14 | extend SetProfileRegionFromCityState::ClassMethods | 13 | extend SetProfileRegionFromCityState::ClassMethods |
15 | set_profile_region_from_city_state | 14 | set_profile_region_from_city_state |
app/models/enterprise.rb
@@ -22,7 +22,7 @@ class Enterprise < Organization | @@ -22,7 +22,7 @@ class Enterprise < Organization | ||
22 | 22 | ||
23 | N_('Organization website'); N_('Historic and current context'); N_('Activities short description'); N_('City'); N_('State'); N_('Country'); N_('ZIP code') | 23 | N_('Organization website'); N_('Historic and current context'); N_('Activities short description'); N_('City'); N_('State'); N_('Country'); N_('ZIP code') |
24 | 24 | ||
25 | - settings_items :organization_website, :historic_and_current_context, :activities_short_description, :zip_code, :city, :state, :country | 25 | + settings_items :organization_website, :historic_and_current_context, :activities_short_description |
26 | 26 | ||
27 | extend SetProfileRegionFromCityState::ClassMethods | 27 | extend SetProfileRegionFromCityState::ClassMethods |
28 | set_profile_region_from_city_state | 28 | set_profile_region_from_city_state |
app/models/organization.rb
@@ -108,6 +108,8 @@ class Organization < Profile | @@ -108,6 +108,8 @@ class Organization < Profile | ||
108 | N_('Display name'); N_('Description'); N_('Contact person'); N_('Contact email'); N_('Acronym'); N_('Foundation year'); N_('Legal form'); N_('Economic activity'); N_('Management information'); N_('Tag list'); N_('District'); N_('Address reference') | 108 | N_('Display name'); N_('Description'); N_('Contact person'); N_('Contact email'); N_('Acronym'); N_('Foundation year'); N_('Legal form'); N_('Economic activity'); N_('Management information'); N_('Tag list'); N_('District'); N_('Address reference') |
109 | settings_items :display_name, :description, :contact_person, :contact_email, :acronym, :foundation_year, :legal_form, :economic_activity, :management_information, :district, :address_reference | 109 | settings_items :display_name, :description, :contact_person, :contact_email, :acronym, :foundation_year, :legal_form, :economic_activity, :management_information, :district, :address_reference |
110 | 110 | ||
111 | + settings_items :zip_code, :city, :state, :country | ||
112 | + | ||
111 | validates_format_of :foundation_year, :with => Noosfero::Constants::INTEGER_FORMAT | 113 | validates_format_of :foundation_year, :with => Noosfero::Constants::INTEGER_FORMAT |
112 | validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |org| !org.contact_email.blank? }) | 114 | validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |org| !org.contact_email.blank? }) |
113 | validates_as_cnpj :cnpj | 115 | validates_as_cnpj :cnpj |