Skip to content

Commit 996c9ac

Browse files
johnpinto1xsrust
authored andcommitted
Display issue (cropped answers & whitespace) when reviewing DMPs when answers in (#2023)
readonly mode. Fixes issue #1683. When the review mode is readonly, then we display the answer in in a paragraphs.
1 parent 3f3a57f commit 996c9ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/views/answers/_new_edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<% elsif question.question_format.textfield?%>
6060
<%= render(partial: 'questions/new_edit_question_textfield', locals: { f: f, question: question, answer: answer }) %>
6161
<% elsif question.question_format.textarea? %>
62-
<%= render(partial: 'questions/new_edit_question_textarea', locals: { f: f, question: question, answer: answer, locking: locking }) %>
62+
<%= render(partial: 'questions/new_edit_question_textarea', locals: { f: f, question: question, answer: answer, locking: locking, readonly: readonly}) %>
6363
<% end %>
6464
<%= f.button(_('Save'), class: "btn btn-default", type: "submit") %>
6565
</fieldset>

app/views/questions/_new_edit_question_textarea.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
%>
1010
<div class="form-group">
1111
<%= f.label(:text, sanitize(question.text), class: 'control-label') %>
12-
<% if locking %>
12+
<% if locking || readonly %>
1313
<%= sanitize("<p>#{answer.text || question.default_value}</p>") %>
1414
<% else %>
1515
<%= text_area_tag('answer[text]', answer.text || question.default_value, id: "answer-text-#{question.id}", class: "form-control tinymce_answer") %>

0 commit comments

Comments
 (0)