Let batch handler determine whether Execute button is enabled.

This commit is contained in:
Lance Edgar 2015-07-09 13:38:54 -05:00
parent 4290f0d8df
commit dc1ef65441

View file

@ -473,11 +473,14 @@ class BatchCrud(BaseCrud):
'batch_display': self.batch_display,
'batch_display_plural': self.batch_display_plural,
'execute_title': self.handler.get_execute_title(batch),
'execute_enabled': True,
'execute_enabled': self.executable(batch),
'route_prefix': self.route_prefix,
'permission_prefix': self.permission_prefix,
}
def executable(self, batch):
return self.handler.executable(batch)
def flash_create(self, batch):
if 'create' in self.flash:
self.request.session.flash(self.flash['create'])