Implement quick add functionality for incorrect answers; return collapsed partial for quick suggestions in the answers table.
This commit is contained in:
@@ -1469,6 +1469,10 @@ def question_suggest_incorrect_answers(request, pk):
|
||||
existing.append(suggestion)
|
||||
question.answer_suggest_incorrect = existing
|
||||
question.save()
|
||||
# If this is a quick add (from the answers table) return the collapsed partial
|
||||
if request.POST.get("quick"):
|
||||
return render(request, "anatomy/partials/suggest_incorrect_collapsed.html", {"question": question})
|
||||
|
||||
# Recompute candidates and render the edit fragment
|
||||
form = SuggestIncorrectAnswerForm(instance=question)
|
||||
candidates = build_candidates(question)
|
||||
|
||||
Reference in New Issue
Block a user