Some deprecation fixes (end_form_tag and count API).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@676 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-29 17:25:22 +00:00
parent c8b3c8dfec
commit 317b460d96
3 changed files with 7 additions and 7 deletions

View File

@ -178,9 +178,9 @@ module ProjectsHelper
def new_issue_selector
trackers = Tracker.find(:all, :order => 'position')
form_tag({:controller => 'projects', :action => 'add_issue', :id => @project}, :method => :get) +
select_tag('tracker_id', '<option></option' + options_from_collection_for_select(trackers, 'id', 'name'),
:onchange => "if (this.value != '') {this.form.submit()}") +
end_form_tag
# can't use form tag inside helper
content_tag('form',
select_tag('tracker_id', '<option></option' + options_from_collection_for_select(trackers, 'id', 'name'), :onchange => "if (this.value != '') {this.form.submit()}"),
:action => url_for(:controller => 'projects', :action => 'add_issue', :id => @project), :method => 'get')
end
end

View File

@ -24,5 +24,5 @@
<h3><%=l(:label_activity)%></h3>
<p>
<%=l(:label_reported_issues)%>: <%= Issue.count(["author_id=?", @user.id]) %>
<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
</p>

View File

@ -1,6 +1,6 @@
<h2><%=l(:label_permissions_report)%></h2>
<%= start_form_tag({:action => 'report'}, :id => 'permissions_form') %>
<% form_tag({:action => 'report'}, :id => 'permissions_form') do %>
<%= hidden_field_tag 'permissions[0]', '' %>
<table class="list">
<thead>
@ -28,4 +28,4 @@
</table>
<p><%= check_all_links 'permissions_form' %></p>
<p><%= submit_tag l(:button_save) %></p>
<%= end_form_tag %>
<% end %>