Project

General

Profile

Patch #9037 » 0002-Fixed-clickable-checkbox-labels-clear-id-attr-on-the.patch

Alex Shulgin, 2011-08-11 09:56

View differences:

app/helpers/custom_fields_helper.rb
44 44
    when "text"
45 45
      text_area_tag(field_name, custom_value.value, :id => field_id, :rows => 3, :style => 'width:90%')
46 46
    when "bool"
47
      hidden_field_tag(field_name, '0') + check_box_tag(field_name, '1', custom_value.true?, :id => field_id)
47
      hidden_field_tag(field_name, '0', :id => nil) + check_box_tag(field_name, '1', custom_value.true?, :id => field_id)
48 48
    when "list"
49 49
      blank_option = custom_field.is_required? ?
50 50
                       (custom_field.default_value.blank? ? "<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" : '') : 
app/helpers/settings_helper.rb
43 43
    setting_values = [] unless setting_values.is_a?(Array)
44 44

  
45 45
    setting_label(setting, options) +
46
      hidden_field_tag("settings[#{setting}][]", '') +
46
      hidden_field_tag("settings[#{setting}][]", '', :id => nil) +
47 47
      choices.collect do |choice|
48 48
        text, value = (choice.is_a?(Array) ? choice : [choice, choice])
49 49
        content_tag(
......
70 70

  
71 71
  def setting_check_box(setting, options={})
72 72
    setting_label(setting, options) +
73
      hidden_field_tag("settings[#{setting}]", 0) +
73
      hidden_field_tag("settings[#{setting}]", 0, :id => nil) +
74 74
        check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options)
75 75
  end
76 76

  
app/views/activities/index.html.erb
48 48
<br />
49 49
<% end %></p>
50 50
<% if @project && @project.descendants.active.any? %>
51
	  <%= hidden_field_tag 'with_subprojects', 0 %>
51
	  <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
52 52
    <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
53 53
<% end %>
54 54
<%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
app/views/versions/index.html.erb
37 37
<br />
38 38
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
39 39
<% if @project.descendants.active.any? %>
40
	<%= hidden_field_tag 'with_subprojects', 0 %>
40
	<%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
41 41
  <br /><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
42 42
<% end %>
43 43
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
app/views/workflows/edit.rhtml
12 12
  <label><%=l(:label_tracker)%>:</label>
13 13
	<%= select_tag 'tracker_id', options_from_collection_for_select(@trackers, "id", "name", @tracker && @tracker.id) %>
14 14
  
15
  <%= hidden_field_tag 'used_statuses_only', '0' %>
15
  <%= hidden_field_tag 'used_statuses_only', '0', :id => nil %>
16 16
  <label><%= check_box_tag 'used_statuses_only', '1', @used_statuses_only %> <%= l(:label_display_used_statuses_only) %></label>
17 17
</p>
18 18
<p>
(2-2/2)