org.views.form_definition

Attributes

FormDefinitionT

Functions

get_form_class(→ type[onegov.org.forms.FormDefinitionForm])

get_hints(→ Iterator[tuple[str, str]])

handle_form_change_name(→ FormDefinitionT)

handle_change_form_name(→ RenderData | Response)

Since the name used for the url is the primary key, we create a new

handle_defined_form(→ RenderData | Response)

Renders the empty form and takes input, even if it's not valid, stores

handle_new_definition(→ RenderData | Response)

handle_edit_definition(→ RenderData | Response)

delete_form_definition(→ None)

With introduction of cancelling submissions over the registration window,

Module Contents

org.views.form_definition.FormDefinitionT[source]
org.views.form_definition.get_form_class(model: onegov.org.models.BuiltinFormDefinition | onegov.org.models.CustomFormDefinition | onegov.form.FormCollection, request: onegov.org.request.OrgRequest) type[onegov.org.forms.FormDefinitionForm][source]
org.views.form_definition.get_hints(layout: onegov.core.layout.Layout, window: onegov.form.FormRegistrationWindow | None) Iterator[tuple[str, str]][source]
org.views.form_definition.handle_form_change_name(form: FormDefinitionT, session: sqlalchemy.orm.Session, new_name: str) FormDefinitionT[source]
org.views.form_definition.handle_change_form_name(self: onegov.form.FormDefinition, request: onegov.org.request.OrgRequest, form: onegov.org.forms.form_definition.FormDefinitionUrlForm, layout: onegov.org.layout.FormEditorLayout | None = None) RenderData | Response[source]

Since the name used for the url is the primary key, we create a new FormDefinition to make our live easier

org.views.form_definition.handle_defined_form(self: onegov.form.FormDefinition, request: onegov.org.request.OrgRequest, form: onegov.form.Form, layout: onegov.org.layout.FormSubmissionLayout | None = None) RenderData | Response[source]

Renders the empty form and takes input, even if it’s not valid, stores it as a pending submission and redirects the user to the view that handles pending submissions.

org.views.form_definition.handle_new_definition(self: onegov.form.FormCollection, request: onegov.org.request.OrgRequest, form: onegov.org.forms.FormDefinitionForm, layout: onegov.org.layout.FormEditorLayout | None = None) RenderData | Response[source]
org.views.form_definition.handle_edit_definition(self: onegov.form.FormDefinition, request: onegov.org.request.OrgRequest, form: onegov.org.forms.FormDefinitionForm, layout: onegov.org.layout.FormEditorLayout | None = None) RenderData | Response[source]
org.views.form_definition.delete_form_definition(self: onegov.form.FormDefinition, request: onegov.org.request.OrgRequest) None[source]

With introduction of cancelling submissions over the registration window, we encourage the user to use this functionality to cancel all form submissions through the ticket system.

This ensures all submissions are cancelled/denied and the tickets are closed.In that case the ticket itself attached to the submission is deletable.

If the customer wants to delete the form directly, we allow it now even when there are completed submissions. In each case there is a ticket associated with it we might take a snapshot before deleting it.