summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-11 13:05:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-11 13:05:41 +0000
commit60b9e59d1580583ce1ab934349f4393f3ed13c63 (patch)
tree5aa4b3c56b9d0276d3c5b379658f877a739e24d0 /app/views
parent2ec55c5337f9eaf35a30257a416d87f99f7bae27 (diff)
downloadredmine-60b9e59d1580583ce1ab934349f4393f3ed13c63.tar.gz
redmine-60b9e59d1580583ce1ab934349f4393f3ed13c63.zip
Displays the full form when creating a version from the issue form so that required custom fields can be filled (#7398).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8845 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/_attributes.html.erb10
-rw-r--r--app/views/versions/_new_modal.html.erb9
2 files changed, 13 insertions, 6 deletions
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index fed949e24..90d47a20c 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -27,12 +27,10 @@
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true %>
-<%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
- l(:label_version_new),
- 'version[name]',
- {:controller => 'versions', :action => 'create', :project_id => @issue.project},
- :title => l(:label_version_new),
- :tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
+<%= link_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
+ {:url => new_project_version_path(@issue.project), :method => 'get'},
+ :title => l(:label_version_new),
+ :tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
</p>
<% end %>
</div>
diff --git a/app/views/versions/_new_modal.html.erb b/app/views/versions/_new_modal.html.erb
new file mode 100644
index 000000000..8b58883c8
--- /dev/null
+++ b/app/views/versions/_new_modal.html.erb
@@ -0,0 +1,9 @@
+<h3 class="title"><%=l(:label_version_new)%></h3>
+
+<% labelled_remote_form_for @version, :url => project_versions_path(@project) do |f| %>
+<%= render :partial => 'versions/form', :locals => { :f => f } %>
+ <p class="buttons">
+ <%= submit_tag l(:button_create), :name => nil %>
+ <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
+ </p>
+<% end %>