Commit 0b8c2b19985e15f935c4b6fb66ddf13891f2a869

Authored by Daniela Feitosa
1 parent 14615aab

ActionItem838: removing fields management_information and legal_form

app/helpers/enterprise_homepage_helper.rb
@@ -8,8 +8,6 @@ module EnterpriseHomepageHelper @@ -8,8 +8,6 @@ module EnterpriseHomepageHelper
8 [ _('Phone(s):'), :contact_phone ], 8 [ _('Phone(s):'), :contact_phone ],
9 [ _('Location:'), :location ], 9 [ _('Location:'), :location ],
10 [ _('Address:'), :address ], 10 [ _('Address:'), :address ],
11 - [ _('Legal form:'), :legal_form ],  
12 - [ _('Foundation year:'), :foundation_year ],  
13 [ _('Economic activity:'), :economic_activity ] 11 [ _('Economic activity:'), :economic_activity ]
14 ].each { | name, att | 12 ].each { | name, att |
15 if profile.send( att ) and not profile.send( att ).blank? 13 if profile.send( att ) and not profile.send( att ).blank?
app/views/enterprise_editor/_form.rhtml
@@ -16,15 +16,9 @@ @@ -16,15 +16,9 @@
16 <p class='formfield text_field'><label for="foundation_year"><%= _('Foundation Year') %></label><br/> 16 <p class='formfield text_field'><label for="foundation_year"><%= _('Foundation Year') %></label><br/>
17 <%= text_field 'enterprise', 'foundation_year', 'size' => 20 %></p> 17 <%= text_field 'enterprise', 'foundation_year', 'size' => 20 %></p>
18 18
19 -<p class='formfield text_field'><label for="legal_form"><%= _('Legal Form') %></label><br/>  
20 -<%= text_field 'enterprise', 'legal_form', 'size' => 20 %></p>  
21 -  
22 <p class='formfield text_field'><label for="economic_activity"><%= _('Economic Activity') %></label><br/> 19 <p class='formfield text_field'><label for="economic_activity"><%= _('Economic Activity') %></label><br/>
23 <%= text_field 'enterprise', 'economic_activity', 'size' => 20 %></p> 20 <%= text_field 'enterprise', 'economic_activity', 'size' => 20 %></p>
24 21
25 -<p class='formfield text_area'><label for="management_information"><%= _('Management Information') %></label><br/>  
26 -<%= text_area 'enterprise', 'management_information', 'cols' => 40, 'rows' => 20 %></p>  
27 -  
28 <p class='formfield select'><label for="validation_entity"><%= _('Validation Entity') %></label><br/> 22 <p class='formfield select'><label for="validation_entity"><%= _('Validation Entity') %></label><br/>
29 <%= select 'validation_entity', 'id', @validation_entities.map{|v| [v.name, v.id]}, :include_blank => true %></p> 23 <%= select 'validation_entity', 'id', @validation_entities.map{|v| [v.name, v.id]}, :include_blank => true %></p>
30 24
app/views/enterprise_editor/index.rhtml
@@ -8,9 +8,7 @@ @@ -8,9 +8,7 @@
8 <p> <%= _('Contact person:') %> <%= @enterprise.contact_person %> </p> 8 <p> <%= _('Contact person:') %> <%= @enterprise.contact_person %> </p>
9 <p> <%= _('Acronym:') %> <%= @enterprise.acronym %> </p> 9 <p> <%= _('Acronym:') %> <%= @enterprise.acronym %> </p>
10 <p> <%= _('Foundation year:') %> <%= @enterprise.foundation_year %> </p> 10 <p> <%= _('Foundation year:') %> <%= @enterprise.foundation_year %> </p>
11 -<p> <%= _('Legal Form:') %> <%= @enterprise.legal_form %> </p>  
12 <p> <%= _('Economic activity:') %> <%= @enterprise.economic_activity %> </p> 11 <p> <%= _('Economic activity:') %> <%= @enterprise.economic_activity %> </p>
13 -<p> <%= _('Management infomation:') %> <%= @enterprise.management_information %> </p>  
14 12
15 <%= link_to _('Edit enterprise'), :action => 'edit', :id => @enterprise %> 13 <%= link_to _('Edit enterprise'), :action => 'edit', :id => @enterprise %>
16 <%= help _('Change the information about the enterprise') %> 14 <%= help _('Change the information about the enterprise') %>
app/views/profile_editor/_organization.rhtml
@@ -13,9 +13,7 @@ @@ -13,9 +13,7 @@
13 <%= f.text_field(:foundation_year) %> 13 <%= f.text_field(:foundation_year) %>
14 <%= f.text_field(:contact_person) %> 14 <%= f.text_field(:contact_person) %>
15 <%= f.text_field(:contact_email) %> 15 <%= f.text_field(:contact_email) %>
16 - <%= f.text_field(:legal_form) %>  
17 <%= f.text_field(:economic_activity) %> 16 <%= f.text_field(:economic_activity) %>
18 - <%= f.text_area(:management_information, :rows => 5) %>  
19 <%= f.text_area(:description, :rows => 5) if @profile.kind_of?(Community) %> 17 <%= f.text_area(:description, :rows => 5) if @profile.kind_of?(Community) %>
20 <h1><%= _('Moderation options') %></h1> 18 <h1><%= _('Moderation options') %></h1>
21 <div style='margin-bottom: 1em'> 19 <div style='margin-bottom: 1em'>
test/unit/create_enterprise_test.rb
@@ -5,7 +5,7 @@ class CreateEnterpriseTest &lt; Test::Unit::TestCase @@ -5,7 +5,7 @@ class CreateEnterpriseTest &lt; Test::Unit::TestCase
5 should 'provide needed data' do 5 should 'provide needed data' do
6 task = CreateEnterprise.new 6 task = CreateEnterprise.new
7 7
8 - %w[ name identifier address contact_phone contact_person acronym foundation_year legal_form economic_activity management_information ].each do |field| 8 + %w[ name identifier address contact_phone contact_person acronym foundation_year economic_activity ].each do |field|
9 assert task.respond_to?(field) 9 assert task.respond_to?(field)
10 assert task.respond_to?("#{field}=") 10 assert task.respond_to?("#{field}=")
11 end 11 end