diff --git a/app/helpers/article_helper.rb b/app/helpers/article_helper.rb index ee390a7..4ec0477 100644 --- a/app/helpers/article_helper.rb +++ b/app/helpers/article_helper.rb @@ -23,13 +23,11 @@ module ArticleHelper ) : '') + - (article.parent && article.parent.forum? && controller.action_name == 'new' ? - hidden_field_tag('article[accept_comments]', 1) : content_tag( 'div', check_box(:article, :accept_comments) + content_tag('label', (article.parent && article.parent.forum? ? _('This topic is opened for replies') : _('I want to receive comments about this article')), :for => 'article_accept_comments') - )) + + ) + content_tag( 'div', diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 501af9a..a7a41e6 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -1601,11 +1601,11 @@ class CmsControllerTest < ActionController::TestCase assert_no_tag :tag => 'input', :attributes => { :type => 'checkbox', :name => 'article[display_posts_in_current_language]', :checked => 'checked' } end - should 'not display accept comments option when creating forum post' do + should 'display accept comments option when creating forum post' do profile.articles << f = Forum.new(:name => 'Forum for test') get :new, :profile => profile.identifier, :type => 'TinyMceArticle', :parent_id => f.id - assert :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'hidden'} - assert_no_tag :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'checkbox'} + assert_no_tag :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'hidden'} + assert_tag :tag => 'input', :attributes => {:name => 'article[accept_comments]', :value => 1, :type => 'checkbox'} end should 'display accept comments option when creating an article that is not a forum post' do -- libgit2 0.21.2