Convert DocumentTypeFilteredSelectForm to use generic FilteredSelectionForm
The form DocumentTypeFilteredSelectForm
(https://gitlab.com/mayan-edms/mayan-edms/-/blob/master/mayan/apps/documents/forms/document_type_forms.py#L11) performs filtering of choices based the user accessing the form. The filtering pattern became common and a generic form called FilteredSelectionForm
was created and made to be reusable.
Update DocumentTypeFilteredSelectForm
to be a subclass of FilteredSelectionForm
(https://gitlab.com/mayan-edms/mayan-edms/-/blob/master/mayan/apps/common/forms.py#L228) to remove the duplicated code.
Example: https://gitlab.com/mayan-edms/mayan-edms/-/blob/master/mayan/apps/tags/forms.py#L8