How to use the deform.form.Button function in deform

To help you get started, we’ve selected a few deform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github websauna / websauna / websauna / system / crud / views.py View on Github external
def get_buttons(self) -> t.List[deform.form.Button]:
        buttons = (
            deform.form.Button("add"),
            deform.form.Button("cancel"),
        )
        return buttons
github websauna / websauna / websauna / system / crud / views.py View on Github external
def get_buttons(self) -> t.List[deform.form.Button]:
        buttons = (
            deform.form.Button("add"),
            deform.form.Button("cancel"),
        )
        return buttons
github websauna / websauna / websauna / system / crud / views.py View on Github external
def get_buttons(self) -> t.Iterable[deform.form.Button]:
        return (
            deform.form.Button("save"),
            deform.form.Button("cancel"),
        )
github websauna / websauna / websauna / system / crud / views.py View on Github external
def get_buttons(self) -> t.Iterable[deform.form.Button]:
        return (
            deform.form.Button("save"),
            deform.form.Button("cancel"),
        )
github Pylons / pyramid_deform / pyramid_deform / __init__.py View on Github external
form_view = self.form_view_class(request)
        schema = self.wizard.schemas[step]
        self.schema = schema.bind(request=request)
        form_view.schema = self.schema
        buttons = []

        prev_disabled = False
        next_disabled = False

        if hasattr(schema, 'prev_ok'):
            prev_disabled = not schema.prev_ok(request)

        if hasattr(schema, 'next_ok'):
            next_disabled = not schema.next_ok(request)

        prev_button = Button(name='previous', title='Previous',
                             disabled=prev_disabled)
        next_button = Button(name='next', title='Next',
                             disabled=next_disabled)
        done_button = Button(name='next', title='Done',
                             disabled=next_disabled)

        if step > 0:
            buttons.append(prev_button)

        if step < len(self.wizard.schemas)-1:
            buttons.append(next_button)
        else:
            buttons.append(done_button)

        form_view.buttons = buttons
        form_view.next_success = self.next_success
github Pylons / pyramid_deform / pyramid_deform / __init__.py View on Github external
self.schema = schema.bind(request=request)
        form_view.schema = self.schema
        buttons = []

        prev_disabled = False
        next_disabled = False

        if hasattr(schema, 'prev_ok'):
            prev_disabled = not schema.prev_ok(request)

        if hasattr(schema, 'next_ok'):
            next_disabled = not schema.next_ok(request)

        prev_button = Button(name='previous', title='Previous',
                             disabled=prev_disabled)
        next_button = Button(name='next', title='Next',
                             disabled=next_disabled)
        done_button = Button(name='next', title='Done',
                             disabled=next_disabled)

        if step > 0:
            buttons.append(prev_button)

        if step < len(self.wizard.schemas)-1:
            buttons.append(next_button)
        else:
            buttons.append(done_button)

        form_view.buttons = buttons
        form_view.next_success = self.next_success
        form_view.previous_success = self.previous_success
        form_view.previous_failure = self.previous_failure