<%= l(:label_role) %> <%= radio_button_tag 'status', 1, custom_field.user_role.blank?, :id => 'custom_field_user_role_all', :data => {:disables => '.custom_field_user_role input'} %> <%= l(:label_all) %> <%= radio_button_tag 'status', 0, custom_field.user_role.present?, :id => 'custom_field_user_role_only', :data => {:enables => '.custom_field_user_role input'} %> <%= l(:label_only) %>: <% Role.givable.sorted.each do |role| %> <%= check_box_tag 'custom_field[user_role][]', role.id, custom_field.user_role.is_a?(Array) && custom_field.user_role.include?(role.id.to_s), :id => nil %> <%= role.name %> <% end %> <%= hidden_field_tag 'custom_field[user_role][]', '' %>
<%= edit_tag_style_tag f %>