_form.html.erb
56 lines
| 2.5 KiB
| text/plain
|
TextLexer
|
r9346 | <%= labelled_fields_for :issue, @issue do |f| %> | ||
|
r4051 | <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> | ||
|
r14406 | <%= hidden_field_tag 'form_update_triggered_by', '' %> | ||
|
r4051 | |||
|
r8080 | <% if @issue.safe_attribute? 'is_private' %> | ||
|
r14372 | <p id="issue_is_private_wrap"> | ||
|
r9929 | <%= f.check_box :is_private, :no_label => true %><label class="inline" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label> | ||
|
r5346 | </p> | ||
<% end %> | ||||
|
r8107 | |||
|
r13617 | <% if @issue.safe_attribute?('project_id') && (!@issue.new_record? || @project.nil? || @issue.copy?) %> | ||
|
r9885 | <p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true}, | ||
|
r14406 | :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p> | ||
|
r8411 | <% end %> | ||
|
r8107 | <% if @issue.safe_attribute? 'tracker_id' %> | ||
|
r9885 | <p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true}, | ||
|
r14406 | :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p> | ||
|
r8107 | <% end %> | ||
|
r1066 | |||
|
r8107 | <% if @issue.safe_attribute? 'subject' %> | ||
|
r11003 | <p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %></p> | ||
|
r8107 | <% end %> | ||
<% if @issue.safe_attribute? 'description' %> | ||||
|
r7982 | <p> | ||
|
r9794 | <%= f.label_for_field :description, :required => @issue.required_attribute?('description') %> | ||
|
r14371 | <%= link_to_function content_tag(:span, l(:button_edit), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> | ||
|
r9346 | <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> | ||
|
r8003 | <%= f.text_area :description, | ||
|
r1083 | :cols => 60, | ||
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), | ||||
:accesskey => accesskey(:edit), | ||||
|
r7982 | :class => 'wiki-edit', | ||
:no_label => true %> | ||||
<% end %> | ||||
</p> | ||||
|
r8107 | <%= wikitoolbar_for 'issue_description' %> | ||
<% end %> | ||||
|
r1083 | |||
|
r2994 | <div id="attributes" class="attributes"> | ||
|
r7236 | <%= render :partial => 'issues/attributes' %> | ||
|
r2267 | </div> | ||
|
r800 | |||
|
r1785 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> | ||
|
r8411 | <% end %> | ||
|
r12666 | |||
<% heads_for_wiki_formatter %> | ||||
|
r12695 | |||
<%= javascript_tag do %> | ||||
$(document).ready(function(){ | ||||
$("#issue_tracker_id, #issue_status_id").each(function(){ | ||||
$(this).val($(this).find("option[selected=selected]").val()); | ||||
}); | ||||
}); | ||||
<% end %> | ||||