summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-04-26 10:20:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-04-26 10:20:48 +0000
commit76b92fb999750402a448af0226c871bcef0ec2d9 (patch)
treed77805fb8e9106c5dc4a6552ef9d9bf4b18f16a9 /app
parenta9f86444fc5acd7502b72ea905f88952fc3c1434 (diff)
downloadredmine-76b92fb999750402a448af0226c871bcef0ec2d9.tar.gz
redmine-76b92fb999750402a448af0226c871bcef0ec2d9.zip
Warn user that subprojects are also deleted when deleting a project (#1111) and add a checkbox to confirm the deletion.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1359 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/destroy.rhtml16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/views/projects/destroy.rhtml b/app/views/projects/destroy.rhtml
index 4531cb845..a1913c115 100644
--- a/app/views/projects/destroy.rhtml
+++ b/app/views/projects/destroy.rhtml
@@ -1,14 +1,16 @@
<h2><%=l(:label_confirmation)%></h2>
-<div class="box">
-<center>
-<p><strong><%=h @project_to_destroy.name %></strong><br />
-<%=l(:text_project_destroy_confirmation)%></p>
+<div class="warning">
+<p><strong><%=h @project_to_destroy %></strong><br />
+<%=l(:text_project_destroy_confirmation)%>
+<% if @project_to_destroy.children.any? %>
+<br /><%= l(:text_subprojects_destroy_warning, content_tag('strong', h(@project_to_destroy.children.sort.collect{|p| p.to_s}.join(', ')))) %>
+<% end %>
+</p>
<p>
<% form_tag({:controller => 'projects', :action => 'destroy', :id => @project_to_destroy}) do %>
- <%= hidden_field_tag "confirm", 1 %>
+ <label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete) %>
<% end %>
</p>
-</center>
-</div> \ No newline at end of file
+</div>