def __init__(self, view): super().__init__(view, 'test') self.add_child( FileInputButton(self, fixture.domain_object.fields.files)) self.define_event_handler(fixture.domain_object.events.submit) self.add_child( Button(self, fixture.domain_object.events.submit))
def __init__(self, view): super(FileUploadForm, self).__init__(view, 'test') if self.exception: self.use_layout(FormLayout()) self.layout.add_alert_for_domain_exception(self.exception) self.add_child(FileUploadInputStub(self, fixture.domain_object.fields.files)) self.define_event_handler(fixture.domain_object.events.submit) self.add_child(Button(self, fixture.domain_object.events.submit))
def __init__(self, view): super(FileUploadForm, self).__init__(view, 'test') self.set_attribute('novalidate', 'novalidate') self.use_layout(FormLayout()) self.layout.add_input( FileUploadInput(self, fixture.domain_object.fields.files)) self.define_event_handler(fixture.domain_object.events.submit) self.add_child( Button(self, fixture.domain_object.events.submit))