Add configure_execute_form()
hook for batch views
also enable bulk-delete of row results by default for batch views
This commit is contained in:
parent
c8201de2ff
commit
99a5615e91
|
@ -72,6 +72,7 @@ class BatchMasterView(MasterView):
|
|||
batch_handler_class = None
|
||||
has_rows = True
|
||||
rows_deletable = True
|
||||
rows_bulk_deletable = True
|
||||
rows_downloadable_csv = True
|
||||
rows_downloadable_xlsx = True
|
||||
refreshable = True
|
||||
|
@ -170,6 +171,7 @@ class BatchMasterView(MasterView):
|
|||
return self.rattail_config.batch_filepath(batch.batch_key, batch.uuid, filename)
|
||||
|
||||
def template_kwargs_view(self, **kwargs):
|
||||
kwargs = super(BatchMasterView, self).template_kwargs_view(**kwargs)
|
||||
use_buefy = self.get_use_buefy()
|
||||
batch = kwargs['instance']
|
||||
kwargs['batch'] = batch
|
||||
|
@ -880,7 +882,12 @@ class BatchMasterView(MasterView):
|
|||
|
||||
kwargs['use_buefy'] = use_buefy
|
||||
kwargs['component'] = 'execute-form'
|
||||
return forms.Form(schema=schema, request=self.request, defaults=defaults, **kwargs)
|
||||
form = forms.Form(schema=schema, request=self.request, defaults=defaults, **kwargs)
|
||||
self.configure_execute_form(form)
|
||||
return form
|
||||
|
||||
def configure_execute_form(self, form):
|
||||
pass
|
||||
|
||||
def get_execute_title(self, batch):
|
||||
if hasattr(self.handler, 'get_execute_title'):
|
||||
|
|
Loading…
Reference in a new issue