org.forms.widgets
¶
Module Contents¶
Classes¶
An upload widget for the |
|
An upload widget for the |
|
A widget for the |
- class org.forms.widgets.UploadOrLinkExistingFileWidget(multiple=False)[source]¶
Bases:
onegov.form.widgets.UploadWidget
An upload widget for the
onegov.form.fields.UploadField
class, which supports keeping, removing and replacing already uploaded files.This is necessary as file inputs are read-only on the client and it’s therefore rather easy for users to lose their input otherwise (e.g. a form with a file is rejected because of some mistake - the file disappears once the response is rendered on the client).
- template_data(field: org.forms.fields.UploadOrSelectExistingFileField, force_simple: bool, resend_upload: bool, wrapper_css_class: str, input_html: markupsafe.Markup, **kwargs: Any) tuple[bool, dict[str, Any]] [source]¶
- class org.forms.widgets.UploadOrSelectExistingFileWidget(multiple=False)[source]¶
Bases:
UploadOrLinkExistingFileWidget
An upload widget for the
onegov.form.fields.UploadField
class, which supports keeping, removing and replacing already uploaded files.This is necessary as file inputs are read-only on the client and it’s therefore rather easy for users to lose their input otherwise (e.g. a form with a file is rejected because of some mistake - the file disappears once the response is rendered on the client).
- template_data(field: org.forms.fields.UploadOrSelectExistingFileField, force_simple: bool, resend_upload: bool, wrapper_css_class: str, input_html: markupsafe.Markup, **kwargs: Any) tuple[bool, dict[str, Any]] [source]¶
- class org.forms.widgets.UploadOrSelectExistingMultipleFilesWidget[source]¶
Bases:
onegov.form.widgets.UploadMultipleWidget
A widget for the
onegov.form.fields.UploadMultipleField
class, which supports keeping, removing and replacing already uploaded files.This is necessary as file inputs are read-only on the client and it’s therefore rather easy for users to lose their input otherwise (e.g. a form with a file is rejected because of some mistake - the file disappears once the response is rendered on the client).
We deviate slightly from the norm by rendering the errors ourselves since we’re essentially a list of fields and not a single field most of the time.
- render_input(field: org.forms.fields.UploadOrSelectExistingMultipleFilesField, **kwargs: Any) markupsafe.Markup [source]¶