Skip to content

Commit

Permalink
Fixed issue #15854: Cannot open pop up editor - subquestions (an extr…
Browse files Browse the repository at this point in the history
…a page refresh needed) (#1784)

For new questions qid is random. Then when sent through the URL, common action executes _addPseudoParams which performs a validation. As the new question is still not valid, 403 is gotten. So now, for new questions. we don't send the param.
  • Loading branch information
gabrieljenik committed Mar 1, 2021
1 parent 210bf21 commit 2a8f365
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -108,7 +108,7 @@
onkeypress=" if(event.keyCode==13) { if (event && event.preventDefault) event.preventDefault(); document.getElementById('save-button').click(); return false;}"
/>
<span class="input-group-addon">
{{ getEditor("editanswer","answer_"~language~"_"~qid~"_"~scale_id, "["~gT("Subquestion:", "js")~"]("~language~")",surveyid,gid,qid,'editanswer') }}
{{ getEditor("editanswer","answer_"~language~"_"~qid~"_"~scale_id, "["~gT("Subquestion:", "js")~"]("~language~")",surveyid,gid,(subquestion.qid matches '/^\\d+$/') ? qid : "",'editanswer') }}
</span>
</div>
</td>
Expand Down

0 comments on commit 2a8f365

Please sign in to comment.