Last active
December 18, 2015 17:49
-
-
Save kobake/5821205 to your computer and use it in GitHub Desktop.
(For redmine 2.3.1) Hide status field in new ticket form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git app/views/issues/_attributes.html.erb app/views/issues/_attributes.html.erb | |
index 0e29701..830dfc6 100644 | |
--- app/views/issues/_attributes.html.erb | |
+++ app/views/issues/_attributes.html.erb | |
@@ -2,7 +2,8 @@ | |
<div class="splitcontent"> | |
<div class="splitcontentleft"> | |
-<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> | |
+<% if params[:action] == 'new' %> | |
+<% elsif @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 project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment