recordtransfer.forms - Transfer Forms
Provides all forms used in the Record Transfer application.
- class recordtransfer.forms.AcceptLegal(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
Form for accepting legal terms.
- class Meta
Meta information for the form.
- clean() dict
Clean form data and validate the session token.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.ContactInfoForm(*args, **kwargs)
The Contact Information portion of the form. Contains fields from Section 2 of CAAIS.
- class Meta
Meta information for the form.
- clean() dict
Clean form data.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.ExtendedRecordDescriptionForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
Adds quantity and type of units to record description form. Intended to be used when file uploads are disabled.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.FinalStepFormNoUpload(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
The form where users write any final notes. Intended to be used in place of UploadFilesForm when file uploads are disabled.
- class Meta
Meta information for the form.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.GroupSubmissionForm(*args, **kwargs)
Form for assigning a submission to a specific group.
- class Meta
Meta information for the form.
- clean() dict
Check that chosen group exists and is owned by the user.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.OtherIdentifiersForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
The Other Identifiers portion of the form. Contains fields from Section 1 of CAAIS.
- class Meta
Meta information for the form.
- clean() dict
Check that the other identifier type and value are set if the note is set.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.OtherIdentifiersFormSet(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, form_kwargs=None, error_messages=None)
Special formset to add metadata to the other identifiers formset.
- class Meta
Meta information for the form.
- class recordtransfer.forms.RecordDescriptionForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
The Description Information portion of the form. Contains fields from Section 3 of CAAIS.
- class Meta
Meta information for the form.
- clean() dict
Form date as approximate if user chose to mark the date as approximate.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.ReviewForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
The final step of the form where the user can review their submission before sending it.
- class Meta
Meta information for the form.
- static format_form_data(form_dict: OrderedDict[str, BaseForm | BaseFormSet], user: User) list[ReviewFormItem]
Format form data to be used in a form review page.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.RightsForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
The Rights portion of the form. Contains fields from Section 4 of CAAIS.
- class Meta
Meta information for the form.
- clean() dict
Check that the rights type is set if the other rights type is not.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.RightsFormSet(*args, **kwargs)
Formset for rights information (optional).
- class Meta
Meta information for the form.
- class recordtransfer.forms.SignUpForm(*args, **kwargs)
Form for a user to create a new account.
- clean() dict[str, Any]
Clean data, make sure username and email are not already in use.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.SourceInfoForm(*args, **kwargs)
The Source Information portion of the form. Contains fields from Section 2 of CAAIS.
This form is nominally “optional,” but a user can fill in the fields if they want to. The source name, source type, and source role are all required in CAAIS, so if a user chooses not to fill in the form, we use defaults from the initial data for those fields.
- class Meta
Meta information for the form.
- clean() dict
Clean form and set defaults if the user chose not to enter source info manually.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.SubmissionForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
Base form for all submission forms.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.SubmissionGroupForm(*args, **kwargs)
Form for creating and updating SubmissionGroup instances.
- class Meta
Meta options for SubmissionGroupForm.
- model
alias of
SubmissionGroup
- clean() dict[str, Any]
Clean the form data.
- save(commit: bool = True) SubmissionGroup
Save the form data to a SubmissionGroup instance.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.SubmissionModelForm(*args, **kwargs)
Form for editing Submissions.
- class Meta
Meta class for SubmissionModelForm.
- model
alias of
Submission
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.UploadFilesForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)
The form where users upload their files and write any final notes.
- class Meta
Meta information for the form.
- clean() dict
Check that the session token is valid and that at least one file has been uploaded.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.UserAccountInfoForm(*args, **kwargs)
Form for updating a user’s account information.
- clean() dict[str, Any]
Clean the form data.
- reset_form() None
Reset form fields to initial values from instance.
- property media
Return all media required to render the widgets on this form.
- class recordtransfer.forms.UserContactInfoForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)
ModelForm version of ContactInfoFormMixin for editing a User’s contact information.
- clean() dict
Clean form data.
- property media
Return all media required to render the widgets on this form.
- recordtransfer.forms.clear_form_errors(form: BaseForm | BaseFormSet) None
Clear all errors on a form or formset.