org.views.form_submission

Renders and handles defined forms, turning them into submissions.

Functions

copy_query(→ str)

get_price(→ onegov.pay.Price | None)

handle_pending_submission(→ RenderData | Response)

Renders a pending submission, takes it's input and allows the

handle_complete_submission(→ webob.Response)

view_submission_ticket(→ webob.Response)

handle_accept_registration(→ Response | None)

handle_deny_registration(→ Response | None)

handle_cancel_registration(→ Response | None)

handle_submission_action(→ Response | None)

handle_survey_submission(→ RenderData | Response)

Renders a pending submission, takes it's input and allows the

Module Contents

org.views.form_submission.copy_query(request: onegov.org.request.OrgRequest, url: str, fields: Iterable[str]) str[source]
org.views.form_submission.get_price(request: onegov.org.request.OrgRequest, form: onegov.form.Form, submission: onegov.form.FormSubmission) onegov.pay.Price | None[source]
org.views.form_submission.handle_pending_submission(self: onegov.form.PendingFormSubmission | onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest, layout: onegov.org.layout.FormSubmissionLayout | None = None) RenderData | Response[source]

Renders a pending submission, takes it’s input and allows the user to turn the submission into a complete submission, once all data is valid.

This view has two states, a completable state where the form values are displayed without a form and an edit state, where a form is rendered to change the values.

Takes the following query parameters for customization:

* ``edit`` render the view in the edit state
* ``return-to`` the view redirects to this url once complete
* ``title`` a custom title (required if external submission)
* ``quiet`` no success messages are rendered if present
org.views.form_submission.handle_complete_submission(self: onegov.form.PendingFormSubmission | onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest) webob.Response[source]
org.views.form_submission.view_submission_ticket(self: onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest) webob.Response[source]
org.views.form_submission.handle_accept_registration(self: onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest) Response | None[source]
org.views.form_submission.handle_deny_registration(self: onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest) Response | None[source]
org.views.form_submission.handle_cancel_registration(self: onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest) Response | None[source]
org.views.form_submission.handle_submission_action(self: onegov.form.CompleteFormSubmission, request: onegov.org.request.OrgRequest, action: Literal['confirmed', 'denied', 'cancelled'], ignore_csrf: bool = False, raises: bool = False, no_messages: bool = False, force_email: bool = False) Response | None[source]
org.views.form_submission.handle_survey_submission(self: onegov.form.models.submission.SurveySubmission, request: onegov.org.request.OrgRequest, layout: onegov.org.layout.SurveySubmissionLayout | None = None) RenderData | Response[source]

Renders a pending submission, takes it’s input and allows the user to turn the submission into a complete submission, once all data is valid.