diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-01 08:38:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-01 08:38:21 +0000 |
commit | fb8e348254a24cc3facb238789f555aa70d9857b (patch) | |
tree | 9c2c03173c053763c8a4377a86de2e65ad251b73 /app/views | |
parent | 3d513cae6ee96d0ce6c10b5068f91a6df10999d3 (diff) | |
download | redmine-fb8e348254a24cc3facb238789f555aa70d9857b.tar.gz redmine-fb8e348254a24cc3facb238789f555aa70d9857b.zip |
Set default project version after selecting a different project on the new issue form (#1828).
git-svn-id: http://svn.redmine.org/redmine/trunk@14788 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/_attributes.html.erb | 2 | ||||
-rw-r--r-- | app/views/issues/_form.html.erb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index c5c4e8d1b..4ec2f8159 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -4,7 +4,7 @@ <div class="splitcontentleft"> <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true}, - :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}')" %></p> + :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p> <%= hidden_field_tag 'was_default_status', @issue.status_id, :id => nil if @issue.status == @issue.default_status %> <% else %> <p><label><%= l(:field_status) %></label> <%= @issue.status %></p> diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 9449938c1..5c0ced141 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -1,5 +1,6 @@ <%= labelled_fields_for :issue, @issue do |f| %> <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> +<%= hidden_field_tag 'form_update_triggered_by', '' %> <% if @issue.safe_attribute? 'is_private' %> <p id="issue_is_private_wrap"> @@ -9,12 +10,12 @@ <% if @issue.safe_attribute?('project_id') && (!@issue.new_record? || @project.nil? || @issue.copy?) %> <p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true}, - :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}')" %></p> + :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p> <% end %> <% if @issue.safe_attribute? 'tracker_id' %> <p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true}, - :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}')" %></p> + :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p> <% end %> <% if @issue.safe_attribute? 'subject' %> |