点击添加标签输入焦点却在搜索框问题(两个输入框用了同一个id,修改添加标签的文本框的id)

This commit is contained in:
z9hang 2014-08-27 15:19:18 +08:00
parent 060759774b
commit 8e6ed35497
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@
<span class="font_title_tag"><%= l(:label_tag) %>:</span> <span class="font_title_tag"><%= l(:label_tag) %>:</span>
<% if User.current.logged? %> <% if User.current.logged? %>
<span><%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'name'} %></span> <span><%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'tags_name'} %></span>
<% end %> <% end %>
<div id="tags_show"> <div id="tags_show">
@ -62,7 +62,7 @@
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path, <%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show", :update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %> :complete => '$("#put-tag-form").hide();' do |f| %>
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %> <%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit l(:button_project_tags_add),:class => "small" %> <%= f.submit l(:button_project_tags_add),:class => "small" %>