Added form names and select tag autocomplete off
To make select tags show selected option (FF bug) https://stackoverflow.com/questions/1479233/why-doesnt-firefox-show-the-correct-default-select-option
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<fieldset id="filters" class="collapsible">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||||
<div>
|
||||
<%= form_tag url, id: 'filters_form', method: :get, remote: true do %>
|
||||
<%= form_tag url, id: 'filters-form', name: 'filters-form',
|
||||
method: :get, remote: true do %>
|
||||
|
||||
<table class="filter">
|
||||
<tr>
|
||||
<td style="width:100%;">
|
||||
@@ -9,16 +11,16 @@
|
||||
<td>
|
||||
<%= select_tag 'filters[domain]', domain_options_tag(session[:q_filters][:domain]),
|
||||
prompt: t('.domain_prompt'),
|
||||
onchange: '$("#filters_form").submit(); return false;' %>
|
||||
onchange: '$("#filters-form").submit();' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to l(:button_apply), '#', class: "icon icon-checked",
|
||||
onclick: '$("#filters_form").submit(); return false;' %>
|
||||
onclick: '$("#filters-form").submit(); return false;' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to l(:button_clear), '#', class: "icon icon-reload",
|
||||
onclick: '$("#filters_form input, #filters_form select").val("");
|
||||
$("#filters_form").submit(); return false;' %>
|
||||
onclick: '$("#filters-form input, #filters-form select").val("");
|
||||
$("#filters-form").submit(); return false;' %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<%= error_messages_for @quantity %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p><%= f.select :domain, domain_options, {required: true}, data: {
|
||||
remote: true,
|
||||
url: parents_project_quantities_path(@project),
|
||||
params: "form=#{f.options[:html][:id]}"
|
||||
} %></p>
|
||||
<p><%= f.select :domain, domain_options, {required: true},
|
||||
{autocomplete: 'off',
|
||||
data: {remote: true,
|
||||
url: parents_project_quantities_path(@project),
|
||||
params: "form=#{f.options[:html][:id]}"}}
|
||||
%></p>
|
||||
<p><%= f.select :parent_id, parent_options(@quantity.domain),
|
||||
{required: true, label: :field_parent_quantity, include_blank: t('.null_parent')} %></p>
|
||||
<p><%= f.text_field :name, size: 25, required: true %></p>
|
||||
|
||||
@@ -65,8 +65,10 @@
|
||||
<tr>
|
||||
<td class="form" colspan="6">
|
||||
<div id="edit-quantity">
|
||||
<%= labelled_form_for @quantity, url: quantity_path(@quantity), method: :patch,
|
||||
remote: true, html: {id: 'quantity-edit-form'} do |f| %>
|
||||
<%= labelled_form_for @quantity,
|
||||
url: quantity_path(@quantity),
|
||||
method: :patch, remote: true,
|
||||
html: {id: 'quantity-edit-form', name: 'quantity-edit-form'} do |f| %>
|
||||
|
||||
<%= render partial: 'quantities/form', locals: {f: f} %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
<h2><%= t ".heading_new_quantity" %></h2>
|
||||
|
||||
<%= labelled_form_for @quantity,
|
||||
url: project_quantities_path(@project),
|
||||
html: {id: 'quantity-add-form'} do |f| %>
|
||||
url: project_quantities_path(@project),
|
||||
html: {id: 'quantity-add-form', name: 'quantity-add-form'} do |f| %>
|
||||
|
||||
<%= render partial: 'quantities/form', locals: {f: f} %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", onclick: '$("#add-quantity").hide(); return false;' %>
|
||||
|
||||
Reference in New Issue
Block a user