Commit 2e89b8666c4c944c6ab34e9a775c2c294b7184e8

Authored by Daniela Feitosa
1 parent 0c29ae21

Added labelled_checkbox

(ActionItem1717)
app/helpers/application_helper.rb
... ... @@ -882,7 +882,8 @@ module ApplicationHelper
882 882 end
883 883  
884 884 def profile_field_privacy_selector(profile, name)
885   - profile.public? ? content_tag('div', check_box_tag('profile_data[fields_privacy][' + name + ']', 'public', profile.public_fields.include?(name)) + label_tag('profile_data_fields_privacy_' + name, _('Public')), :class => 'field-privacy-selector') : ''
  885 + return '' unless profile.public?
  886 + content_tag('div', labelled_check_box(_('Public'), 'profile_data[fields_privacy]['+name+']', 'public', profile.public_fields.include?(name)), :class => 'field-privacy-selector')
886 887 end
887 888  
888 889 def template_stylesheet_path
... ...
app/helpers/profile_editor_helper.rb
... ... @@ -146,8 +146,8 @@ module ProfileEditorHelper
146 146 end
147 147  
148 148 def unchangeable_privacy_field(profile)
149   - if profile.public?
150   - check_box_tag('', '', true, :disabled => true) + ' ' + _('Public')
  149 + if profile.public?
  150 + labelled_check_box(_('Public'), '', '', true, :disabled => true)
151 151 else
152 152 ''
153 153 end
... ...