From 39bc1039c4ca678fd47e74f4c4d480480b175ddb Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 14 Feb 2017 22:06:42 -0600 Subject: [PATCH] Set form id for new purchasing batch page --- tailbone/views/purchases/batch.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tailbone/views/purchases/batch.py b/tailbone/views/purchases/batch.py index 33f1a4ee..16389463 100644 --- a/tailbone/views/purchases/batch.py +++ b/tailbone/views/purchases/batch.py @@ -124,6 +124,12 @@ class PurchaseBatchView(BatchMasterView): ], readonly=True) + def make_form(self, batch, **kwargs): + if self.creating: + kwargs.setdefault('id', 'new-purchase-form') + form = super(PurchaseBatchView, self).make_form(batch, **kwargs) + return form + def _preconfigure_fieldset(self, fs): super(PurchaseBatchView, self)._preconfigure_fieldset(fs) fs.mode.set(renderer=forms.renderers.EnumFieldRenderer(self.enum.PURCHASE_BATCH_MODE))