diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-13 12:15:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-13 12:15:21 +0000 |
commit | 35bb707b918d58e23d9a784a9226cade5304a08d (patch) | |
tree | 16ec8ae85dc862614df453a1d6182643cff56ba8 /app | |
parent | 4d5ddb007262c4c85c5086040e9a09fc0d0f5374 (diff) | |
download | redmine-35bb707b918d58e23d9a784a9226cade5304a08d.tar.gz redmine-35bb707b918d58e23d9a784a9226cade5304a08d.zip |
Preview when editing journal notes broken by r15621.
git-svn-id: http://svn.redmine.org/redmine/trunk@16542 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/previews_controller.rb | 4 | ||||
-rw-r--r-- | app/views/journals/_notes_form.html.erb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/previews_controller.rb b/app/controllers/previews_controller.rb index 698816e44..d81560c13 100644 --- a/app/controllers/previews_controller.rb +++ b/app/controllers/previews_controller.rb @@ -25,8 +25,8 @@ class PreviewsController < ApplicationController if @description && @description.gsub(/(\r?\n|\n\r?)/, "\n") == @issue.description.to_s.gsub(/(\r?\n|\n\r?)/, "\n") @description = nil end - # params[:notes] is useful for preview of notes in issue history - @notes = params[:notes] || (params[:issue] ? params[:issue][:notes] : nil) + @notes = params[:journal] ? params[:journal][:notes] : nil + @notes ||= params[:issue] ? params[:issue][:notes] : nil else @description = (params[:issue] ? params[:issue][:description] : nil) end diff --git a/app/views/journals/_notes_form.html.erb b/app/views/journals/_notes_form.html.erb index 3bd6a31fd..2ab978769 100644 --- a/app/views/journals/_notes_form.html.erb +++ b/app/views/journals/_notes_form.html.erb @@ -2,7 +2,7 @@ :remote => true, :method => 'put', :id => "journal-#{@journal.id}-form") do %> - <%= label_tag "notes", l(:description_notes), :class => "hidden-for-sighted" %> + <%= label_tag "notes", l(:description_notes), :class => "hidden-for-sighted", :for => "journal_#{@journal.id}_notes" %> <%= text_area_tag 'journal[notes]', @journal.notes, :id => "journal_#{@journal.id}_notes", :class => 'wiki-edit', |