diff --git a/app/controllers/my_profile/profile_editor_controller.rb b/app/controllers/my_profile/profile_editor_controller.rb index 94b0df2..353685c 100644 --- a/app/controllers/my_profile/profile_editor_controller.rb +++ b/app/controllers/my_profile/profile_editor_controller.rb @@ -21,6 +21,7 @@ class ProfileEditorController < MyProfileController Profile.transaction do Image.transaction do begin + params[:profile_data][:visible] = params[:profile_data][:visible] == '0' @plugins.dispatch(:profile_editor_transaction_extras) @profile_data.update_attributes!(params[:profile_data]) redirect_to :action => 'index', :profile => profile.identifier diff --git a/app/models/community.rb b/app/models/community.rb index 9fdd291..7cd2bad 100644 --- a/app/models/community.rb +++ b/app/models/community.rb @@ -1,6 +1,6 @@ class Community < Organization - attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type, :address_reference, :district, :tag_list, :language + attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type, :address_reference, :district, :tag_list, :language, :visible after_destroy :check_invite_member_for_destroy def self.type_name diff --git a/app/views/profile_editor/edit.html.erb b/app/views/profile_editor/edit.html.erb index abef586..dcf7638 100644 --- a/app/views/profile_editor/edit.html.erb +++ b/app/views/profile_editor/edit.html.erb @@ -33,6 +33,10 @@ <% else %>
+ <%= labelled_check_box _('Hidden — show content of this group only to administrators'), 'profile_data[visible]', false, !@profile.visible %> +
+
+
<%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
-- libgit2 0.21.2