diff --git a/app/controllers/my_profile/profile_editor_controller.rb b/app/controllers/my_profile/profile_editor_controller.rb index d9b6da4..beac8a5 100644 --- a/app/controllers/my_profile/profile_editor_controller.rb +++ b/app/controllers/my_profile/profile_editor_controller.rb @@ -45,7 +45,7 @@ class ProfileEditorController < MyProfileController redirect_to :action => 'index' else flash[:notice] = _('Could not upload image') - render :action => 'change_imange' + render :action => 'change_image' end end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3781224..828e98e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -190,10 +190,12 @@ module ApplicationHelper field_id = $1 end field_html =~ /type=['"]([^'"]*)['"]/ + field_html =~ /<(\w*)/ unless $1 field_type = $1 + field_class = 'formfield type-' + field_type if field_type label_html = content_tag('label', text, :class => 'formlabel', :for => field_id) - control_html = content_tag('div', field_html, :class => 'formfield type-'+field_type ) + control_html = content_tag('div', field_html, :class => field_class ) content_tag('div', label_html + control_html, :class => 'formfieldline' ) end diff --git a/app/views/profile_editor/enterprise_info.rhtml b/app/views/profile_editor/enterprise_info.rhtml deleted file mode 100644 index 9f333f5..0000000 --- a/app/views/profile_editor/enterprise_info.rhtml +++ /dev/null @@ -1,32 +0,0 @@ - -
<%= text_field 'enterprise', 'name', 'size' => 20, 'class' => 'formfield text_field' %>
- -
-<%= text_field 'enterprise', 'address', 'size' => 50 %>
-<%= text_field 'enterprise', 'contact_phone', 'size' => 20 %>
-<%= text_field 'organization_info', 'contact_person', 'size' => 20 %>
-<%= text_field 'organization_info', 'acronym', 'size' => 20 %>
-<%= text_field 'organization_info', 'foundation_year', 'size' => 20 %>
-<%= text_field 'organization_info', 'legal_form', 'size' => 20 %>
-<%= text_field 'organization_info', 'economic_activity', 'size' => 20 %>
-<%= text_area 'organization_info', 'management_information', 'cols' => 40, 'rows' => 20 %>
-<%= select 'validation_entity', 'id', @validation_entities.map{|v| [v.name, v.id]}, :include_blank => true %>
-<%= text_field 'enterprise', 'tag_list', 'size' => 20 %>
-<%= text_field 'enterprise', 'name', 'size' => 20, 'class' => 'formfield text_field' %>
- --<%= text_field 'enterprise', 'address', 'size' => 50 , :id => 'address'%>
- -
-<%= text_field 'enterprise', 'contact_phone', 'size' => 20 %>
-<%= text_field 'organization_info', 'contact_person', 'size' => 20 %>
-<%= text_field 'organization_info', 'acronym', 'size' => 20 %>
-<%= text_field 'organization_info', 'foundation_year', 'size' => 20 %>
-<%= text_field 'organization_info', 'legal_form', 'size' => 20 %>
-<%= text_field 'organization_info', 'economic_activity', 'size' => 20 %>
-<%= text_area 'organization_info', 'management_information', 'cols' => 40, 'rows' => 20 %>
-<%= text_field 'enterprise', 'tag_list', 'size' => 20 %>