Correct styles used by #send_notification_option

Use check-box with label styling for a left-aligned check-boxes.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2822/head
Alex Coles 10 years ago
parent e625539204
commit 9e5cfbf2c9
  1. 31
      app/helpers/work_packages_helper.rb

@ -214,26 +214,17 @@ module WorkPackagesHelper
end
end
def send_notification_option(checked = true)
work_package_form_field do
field = content_tag(:label,
l(:label_notify_member_plural),
for: 'send_notification',
class: 'form--label')
field += content_tag 'span', class: 'form--field-container' do
content_tag 'span', class: 'form--check-box-field' do
boxes = hidden_field_tag('send_notification', '0', id: nil)
boxes += check_box_tag('send_notification',
'1',
checked,
class: 'form--check-box')
boxes
end
end
field
def send_notification_option(checked = false)
content_tag(:label, for: 'send_notification', class: 'form--label-with-check-box') do
(content_tag 'span', class: 'form--check-box-container' do
boxes = hidden_field_tag('send_notification', '0', id: nil)
boxes += check_box_tag('send_notification',
'1',
checked,
class: 'form--check-box')
boxes
end) + l(:label_notify_member_plural)
end
end

Loading…
Cancel
Save