Commit 3b6ade2a by Alan Boudreault

Fix answer validation when read_only is True

parent da96ab0e
......@@ -27,6 +27,12 @@ function AnswerBlock(runtime, element) {
// Returns `true` if the child is valid, else `false`
validate: function() {
// return true if the answer is read only
var blockquote_ro = $('blockquote.answer.read_only', element);
if (blockquote_ro.length > 0)
return true;
var input = $(':input', element),
input_value = input.val().replace(/^\s+|\s+$/gm,''),
answer_length = input_value.length,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment