diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-01-10 13:49:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-01-10 13:49:09 +0000 |
commit | 8bab5b4730b10ffd998b9b5db2b04380ed210cd6 (patch) | |
tree | 624d0d35d988a4c50c8d2a888ec039e2c254edb6 | |
parent | be146d492a2392354bd1979d75b74564d811bbd6 (diff) | |
download | redmine-8bab5b4730b10ffd998b9b5db2b04380ed210cd6.tar.gz redmine-8bab5b4730b10ffd998b9b5db2b04380ed210cd6.zip |
Fixed: Cannot create a new category on ticket creation/update page with 0.8.7 (#4400).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@3304 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/issues/_form.rhtml | 2 | ||||
-rw-r--r-- | public/javascripts/application.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/views/issues/_form.rhtml b/app/views/issues/_form.rhtml index b44719002..32c182144 100644 --- a/app/views/issues/_form.rhtml +++ b/app/views/issues/_form.rhtml @@ -28,7 +28,7 @@ <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> <%= prompt_to_remote(l(:label_issue_category_new), l(:label_issue_category_new), 'category[name]', - {:controller => 'projects', :action => 'add_issue_category', :id => @project}, + {:controller => 'projects', :action => 'add_issue_category', :id => @project, :authenticity_token => form_authenticity_token}, :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p> <% end %> <%= content_tag('p', f.select(:fixed_version_id, diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 3becbeb21..635f0383d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -69,7 +69,8 @@ function setPredecessorFieldsVisibility() { function promptToRemote(text, param, url) { value = prompt(text + ':'); if (value) { - new Ajax.Request(url + '?' + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true}); + var sep = (url.indexOf('?') < 0 ? '?' : '&' ) + new Ajax.Request(url + sep + param + '=' + encodeURIComponent(value), {asynchronous:true, evalScripts:true}); return false; } } |