From 2e89b8666c4c944c6ab34e9a775c2c294b7184e8 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Wed, 31 Oct 2012 00:29:24 -0200 Subject: [PATCH] Added labelled_checkbox --- app/helpers/application_helper.rb | 3 ++- app/helpers/profile_editor_helper.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 169d4f4..a9884c3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -882,7 +882,8 @@ module ApplicationHelper end def profile_field_privacy_selector(profile, name) - 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') : '' + return '' unless profile.public? + content_tag('div', labelled_check_box(_('Public'), 'profile_data[fields_privacy]['+name+']', 'public', profile.public_fields.include?(name)), :class => 'field-privacy-selector') end def template_stylesheet_path diff --git a/app/helpers/profile_editor_helper.rb b/app/helpers/profile_editor_helper.rb index 1c6cb8b..bd164f7 100644 --- a/app/helpers/profile_editor_helper.rb +++ b/app/helpers/profile_editor_helper.rb @@ -146,8 +146,8 @@ module ProfileEditorHelper end def unchangeable_privacy_field(profile) - if profile.public? - check_box_tag('', '', true, :disabled => true) + ' ' + _('Public') + if profile.public? + labelled_check_box(_('Public'), '', '', true, :disabled => true) else '' end -- libgit2 0.21.2