<%= form_for(@issue, html: { class: 'square' }) do |f| %> <%= f.error_messages %>
<%= f.label :title %> <%= f.text_field :title %>
<% if cuser and Issue::allowed_categories(cuser).include?(@issue.category_id) %>
<%= f.label :status %> <%= f.select :status, @issue.statuses.invert %>
<%= f.label :assigned %> <%= f.text_field :assigned_name, {:value => User.first(:conditions => {:id => @issue.assigned})} %>
<% end %>
<%= f.label :category_id %> <%= f.select :category_id, Category.domain(Category::DOMAIN_ISSUES).ordered.collect{|c| [c, c.id]} %>
<%= f.label :text %> <%= f.text_area :text, rows: 7 %>
<% if cuser and Issue::allowed_categories(cuser).include?(@issue.category_id) %>
<%= f.label :solution %> <%= f.text_area :solution, rows: 7 %>
<% end %>
<%= f.submit 'Submit' %>
<% end %>