Commit b5fbc8bbb86cb43ce2e6b4b178ec9508dcee8da0
Committed by
Antonio Terceiro
1 parent
2b7a67f9
Exists in
master
and in
29 other branches
ActionItem1160: nickname cant be optional for communities
* this is because of the identifier thats derived from the nickname becouse of ActionItem1126
Showing
3 changed files
with
0 additions
and
15 deletions
Show diff stats
app/models/community.rb
app/views/shared/_custom_fields.rhtml
1 | 1 | <% if profile.community? %> |
2 | - <%= optional_field(profile, 'nickname', labelled_form_field(_('Display name'), text_field(object_name, :nickname) + ' ' + content_tag('em', _('A short name by which the organization is know.'))), only_required) %> | |
3 | 2 | <%= optional_field(profile, 'description', f.text_area(:description, :rows => 5)) %> |
4 | 3 | <%= optional_field(profile, 'language', f.text_field(:language), only_required) %> |
5 | 4 | <% end %> | ... | ... |
test/functional/profile_editor_controller_test.rb
... | ... | @@ -797,17 +797,4 @@ class ProfileEditorControllerTest < Test::Unit::TestCase |
797 | 797 | end |
798 | 798 | end |
799 | 799 | |
800 | - should 'display nickname field only if active when edit community' do | |
801 | - community = Community.create(:name => 'test_profile') | |
802 | - Environment.any_instance.stubs(:required_community_fields).returns([]) | |
803 | - | |
804 | - Environment.any_instance.stubs(:active_community_fields).returns(['description']) | |
805 | - get :edit, :profile => community.identifier | |
806 | - assert_no_tag :tag => 'input', :attributes => { :name => "profile_data[nickname]" } | |
807 | - | |
808 | - Environment.any_instance.stubs(:active_community_fields).returns(['nickname']) | |
809 | - get :edit, :profile => community.identifier | |
810 | - assert_tag :tag => 'input', :attributes => { :name => "profile_data[nickname]" } | |
811 | - end | |
812 | - | |
813 | 800 | end | ... | ... |