summaryrefslogtreecommitdiffstats
path: root/app/views/issues/_form.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/issues/_form.rhtml')
-rw-r--r--app/views/issues/_form.rhtml8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/issues/_form.rhtml b/app/views/issues/_form.rhtml
index d11cea84c..6a4cd0f5f 100644
--- a/app/views/issues/_form.rhtml
+++ b/app/views/issues/_form.rhtml
@@ -1,6 +1,3 @@
-<%= error_messages_for 'issue' %>
-<div class="box">
-
<% if @issue.new_record? %>
<p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p>
<%= observe_field :issue_tracker_id, :url => { :action => :new },
@@ -8,15 +5,17 @@
:with => "Form.serialize('issue-form')" %>
<% end %>
+<div id="issue_descr_fields" <%= 'style="display:none"' unless @issue.new_record? || @issue.errors.any? %>>
<p><%= f.text_field :subject, :size => 80, :required => true %></p>
<p><%= f.text_area :description, :required => true,
:cols => 60,
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
:accesskey => accesskey(:edit),
:class => 'wiki-edit' %></p>
+</div>
<div class="splitcontentleft">
-<% if @issue.new_record? %>
+<% if @issue.new_record? || @allowed_statuses %>
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
<% else %>
<p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p>
@@ -49,7 +48,6 @@
<%= image_to_function "add.png", "addFileField();return false" %></label>
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
<% end %>
-</div>
<%= wikitoolbar_for 'issue_description' %>