<%= _('Activate Intranet access (restricted area only for me)') %>
<%= _('Yes') %>
<%= _('Yes') %>
-
-
-
<%= _('Include my contact in directory of people') %>
<%= _('Yes') %>
<%= _('Yes') %>
-
-
-
<%= _('Show my contents to all internet users') %>
<%= _('Yes') %>
<%= _('No') %>
-
-
-
<%= _('Show my contents to my friends (person)') %>
<%= _('Yes') %>
<%= _('Yes') %>
-
-
+
+ <%= radio_button 'profile_data', 'public_profile', 'true' %>
+ <%= content_tag('label', _('Public'), :for => 'profile_data_public_profile_true') %>
+ — show my contents to all internet users
+
+
+ <%= radio_button 'profile_data', 'public_profile', 'false' %>
+ <%= content_tag('label', _('Private'), :for => 'profile_data_public_profile_false') %>
+ — show my contents only to friends
+
<% else %>
diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb
index 568ef3b..81d57ee 100644
--- a/test/functional/cms_controller_test.rb
+++ b/test/functional/cms_controller_test.rb
@@ -570,15 +570,16 @@ class CmsControllerTest < ActionController::TestCase
should 'display published option' do
get :edit, :profile => profile.identifier, :id => profile.home_page.id
- assert_tag :tag => 'input', :attributes => { :type => 'checkbox', :name => 'article[published]', :checked => 'checked' }
+ assert_tag :tag => 'input', :attributes => { :type => 'radio', :name => 'article[published]', :id => 'article_published_true', :checked => 'checked' }
+ assert_tag :tag => 'input', :attributes => { :type => 'radio', :name => 'article[published]', :id => 'article_published_false' }
end
should "display properly a non-published articles' status" do
article = profile.articles.create!(:name => 'test', :published => false)
get :edit, :profile => profile.identifier, :id => article.id
- assert_tag :tag => 'input', :attributes => { :type => 'checkbox', :name => 'article[published]' }
- assert_no_tag :tag => 'input', :attributes => { :type => 'checkbox', :name => 'article[published]', :checked => 'checked' }
+ assert_tag :tag => 'input', :attributes => { :type => 'radio', :name => 'article[published]', :id => 'article_published_true' }
+ assert_tag :tag => 'input', :attributes => { :type => 'radio', :name => 'article[published]', :id => 'article_published_false', :checked => 'checked' }
end
should 'be able to add image with alignment' do
diff --git a/test/unit/cms_helper_test.rb b/test/unit/cms_helper_test.rb
index 0a19498..f4e048d 100644
--- a/test/unit/cms_helper_test.rb
+++ b/test/unit/cms_helper_test.rb
@@ -9,7 +9,8 @@ class CmsHelperTest < ActiveSupport::TestCase
should 'show default options for article' do
CmsHelperTest.any_instance.stubs(:controller).returns(ActionController::Base.new)
result = options_for_article(RssFeed.new(:profile => Profile.new))
- assert_match /id="article_published" name="article\[published\]" type="checkbox" value="1"/, result
+ assert_match /id="article_published_true" name="article\[published\]" type="radio" value="true"/, result
+ assert_match /id="article_published_false" name="article\[published\]" type="radio" value="false"/, result
assert_match /id="article_accept_comments" name="article\[accept_comments\]" type="checkbox" value="1"/, result
end
--
libgit2 0.21.2