Get rid of newstyle flag for Form.validate() method

we always/only use "new style" now
This commit is contained in:
Lance Edgar 2023-05-14 20:28:48 -05:00
parent a991dc0684
commit 85947878c4
17 changed files with 75 additions and 72 deletions

View file

@ -566,7 +566,7 @@ class BatchMasterView(MasterView):
self.request.session.flash("Request ignored, since batch has already been executed")
else:
form = forms.Form(schema=ToggleComplete(), request=self.request)
if form.validate(newstyle=True):
if form.validate():
if form.validated['complete']:
self.mark_batch_complete(batch)
else:
@ -1273,7 +1273,7 @@ class BatchMasterView(MasterView):
batch = self.get_instance()
self.executing = True
form = self.make_execute_form(batch)
if form.validate(newstyle=True):
if form.validate():
kwargs = dict(form.validated)
# cache options to use as defaults next time
@ -1344,7 +1344,7 @@ class BatchMasterView(MasterView):
indicator page.
"""
form = self.make_execute_form()
if form.validate(newstyle=True):
if form.validate():
kwargs = dict(form.validated)
# cache options to use as defaults next time

View file

@ -234,7 +234,7 @@ class InventoryBatchView(BatchMasterView):
schema = DesktopForm().bind(session=self.Session())
form = forms.Form(schema=schema, request=self.request)
if self.request.method == 'POST':
if form.validate(newstyle=True):
if form.validate():
product = self.Session.get(model.Product, form.validated['product'])