@@ -37,7 +37,7 class QueriesController < ApplicationController | |||
|
37 | 37 | @query.add_filter(field, params[:operators][field], params[:values][field]) |
|
38 | 38 | end if params[:fields] |
|
39 | 39 | |
|
40 |
if request.post? |
|
|
40 | if request.post? && params[:confirm] && @query.save | |
|
41 | 41 | flash[:notice] = l(:notice_successful_create) |
|
42 | 42 | redirect_to :controller => 'projects', :action => 'list_issues', :id => @project, :query_id => @query |
|
43 | 43 | return |
@@ -2,7 +2,7 | |||
|
2 | 2 | <h2><%=l(:label_issue_plural)%></h2> |
|
3 | 3 | <% set_html_title l(:label_issue_plural) %> |
|
4 | 4 | |
|
5 |
<% form_tag({:action => ' |
|
|
5 | <% form_tag({ :controller => 'queries', :action => 'new', :project_id => @project }, :id => 'query_form') do %> | |
|
6 | 6 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
7 | 7 | <% end %> |
|
8 | 8 | <div class="contextual"> |
@@ -18,12 +18,7 | |||
|
18 | 18 | }, :class => 'icon icon-reload' %> |
|
19 | 19 | |
|
20 | 20 | <% if current_role.allowed_to?(:save_queries) %> |
|
21 | <%= link_to_remote l(:button_save), | |
|
22 | { :url => { :controller => 'queries', :action => 'new', :project_id => @project }, | |
|
23 | :method => 'get', | |
|
24 | :update => "content", | |
|
25 | :with => "Form.serialize('query_form')" | |
|
26 | }, :class => 'icon icon-save' %> | |
|
21 | <%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %> | |
|
27 | 22 | <% end %> |
|
28 | 23 | </div> |
|
29 | 24 | <br /> |
General Comments 0
You need to be logged in to leave comments.
Login now