def generate_form(self, formid='deform'): schema = WPSSchema(request=self.request, process=self.process, use_async=self.request.has_permission('admin'), user=self.request.user) submit_button = Button(name='submit', title='Submit', css_class='btn btn-success btn-lg btn-block', disabled=not self.has_execute_permission()) return Form( schema.bind(request=self.request), buttons=(submit_button,), formid=formid, )
def generate_form(self, formid='deform'): schema = WPSSchema(request=self.request, process=self.process, use_async=self.request.has_permission('submit'), user=self.get_user()) submit_button = Button(name='submit', title='Execute', css_class='btn btn-success btn-lg btn-block', disabled=not has_execute_permission( self.request, self.service_name)) return Form( schema, buttons=(submit_button,), formid=formid, )
def schema(self): return WPSSchema(request=self.request, hide_complex=True, process=self.process).bind(request=self.request)