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
|
batch_handler_class = None
|
||||||
has_rows = True
|
has_rows = True
|
||||||
rows_deletable = True
|
rows_deletable = True
|
||||||
|
rows_bulk_deletable = True
|
||||||
rows_downloadable_csv = True
|
rows_downloadable_csv = True
|
||||||
rows_downloadable_xlsx = True
|
rows_downloadable_xlsx = True
|
||||||
refreshable = True
|
refreshable = True
|
||||||
|
@ -170,6 +171,7 @@ class BatchMasterView(MasterView):
|
||||||
return self.rattail_config.batch_filepath(batch.batch_key, batch.uuid, filename)
|
return self.rattail_config.batch_filepath(batch.batch_key, batch.uuid, filename)
|
||||||
|
|
||||||
def template_kwargs_view(self, **kwargs):
|
def template_kwargs_view(self, **kwargs):
|
||||||
|
kwargs = super(BatchMasterView, self).template_kwargs_view(**kwargs)
|
||||||
use_buefy = self.get_use_buefy()
|
use_buefy = self.get_use_buefy()
|
||||||
batch = kwargs['instance']
|
batch = kwargs['instance']
|
||||||
kwargs['batch'] = batch
|
kwargs['batch'] = batch
|
||||||
|
@ -880,7 +882,12 @@ class BatchMasterView(MasterView):
|
||||||
|
|
||||||
kwargs['use_buefy'] = use_buefy
|
kwargs['use_buefy'] = use_buefy
|
||||||
kwargs['component'] = 'execute-form'
|
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):
|
def get_execute_title(self, batch):
|
||||||
if hasattr(self.handler, 'get_execute_title'):
|
if hasattr(self.handler, 'get_execute_title'):
|
||||||
|
|
Loading…
Reference in a new issue