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
app/models/enterprise.rb
... | ... | @@ -22,7 +22,7 @@ class Enterprise < Organization |
22 | 22 | |
23 | 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 | 27 | extend SetProfileRegionFromCityState::ClassMethods |
28 | 28 | set_profile_region_from_city_state | ... | ... |
app/models/organization.rb
... | ... | @@ -108,6 +108,8 @@ class Organization < Profile |
108 | 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 | 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 | 113 | validates_format_of :foundation_year, :with => Noosfero::Constants::INTEGER_FORMAT |
112 | 114 | validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |org| !org.contact_email.blank? }) |
113 | 115 | validates_as_cnpj :cnpj | ... | ... |