You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_notes_form.html.erb 1.4KB

12345678910111213141516171819202122
  1. <%= form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %>
  2. <%= label_tag "notes", l(:description_notes), :class => "hidden-for-sighted" %>
  3. <%= text_area_tag :notes, @journal.notes,
  4. :id => "journal_#{@journal.id}_notes",
  5. :class => 'wiki-edit',
  6. :rows => (@journal.notes.blank? ? 10 : [[10, @journal.notes.length / 50].max, 100].min) %>
  7. <%= call_hook(:view_journals_notes_form_after_notes, { :journal => @journal}) %>
  8. <p><%= submit_tag l(:button_save) %>
  9. <%= link_to_remote l(:label_preview),
  10. { :url => preview_edit_issue_path(:project_id => @project, :id => @journal.issue),
  11. :method => 'post',
  12. :update => "journal_#{@journal.id}_preview",
  13. :with => "Form.serialize('journal-#{@journal.id}-form')",
  14. :complete => "Element.scrollTo('journal_#{@journal.id}_preview')"
  15. }, :accesskey => accesskey(:preview) %>
  16. |
  17. <%= link_to l(:button_cancel), '#', :onclick => "Element.remove('journal-#{@journal.id}-form'); " +
  18. "Element.show('journal-#{@journal.id}-notes'); return false;" %></p>
  19. <div id="journal_<%= @journal.id %>_preview" class="wiki"></div>
  20. <% end %>
  21. <%= wikitoolbar_for "journal_#{@journal.id}_notes" %>