From bcc08f982b8764d988138d0edc7c5eeae55ba628 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 5 Jun 2019 22:08:22 +1000 Subject: [PATCH] Set default ajax form template --- InvenTree/InvenTree/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 71f87ffd19..282541d19f 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -92,6 +92,10 @@ class AjaxMixin(object): on the client side. """ + # By default, point to the modal_form template + # (this can be overridden by a child class) + ajax_template_name = 'modal_form.html' + ajax_form_action = '' ajax_form_title = '' @@ -165,10 +169,6 @@ class AjaxView(AjaxMixin, View): """ An 'AJAXified' View for displaying an object """ - # By default, point to the modal_form template - # (this can be overridden by a child class) - ajax_template_name = 'modal_form.html' - def post(self, request, *args, **kwargs): return JsonResponse('', safe=False)