From ba607f3c523781df2bf1a359273d024e1ad78e1d Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 8 Oct 2024 11:43:00 +0100 Subject: [PATCH] . --- oef/templates/oef/replace_questions.html | 5 +++++ oef/views.py | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/oef/templates/oef/replace_questions.html b/oef/templates/oef/replace_questions.html index 939350e6..63da841f 100644 --- a/oef/templates/oef/replace_questions.html +++ b/oef/templates/oef/replace_questions.html @@ -7,6 +7,11 @@

+ + +
diff --git a/oef/views.py b/oef/views.py index b16cbed7..cbe52f5c 100644 --- a/oef/views.py +++ b/oef/views.py @@ -110,8 +110,12 @@ def entries_by_question(request): def questions_diff(request): if request.method == "POST": - question1 = request.POST.get("question1") - question2 = request.POST.get("question2") + question1 = request.POST.get("question1", False) + question2 = request.POST.get("question2", False) + + if not question1: + question1 = request.POST.get("search") + question2 = request.POST.get("replace") html = HtmlDiff().make_table(question1.split("\n"), question2.split("\n"))