From 87ff0696d3d580d27d276a992f500a6a6bfa745b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 8 Aug 2018 17:02:16 -0400 Subject: [PATCH] Enable the select2 widget for the quick label selection field. Signed-off-by: Roberto Rosario --- HISTORY.rst | 1 + mayan/apps/documents/forms.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 9a542af126..53fb58576c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,7 @@ - Add support for client side caching of document page images. The time the images are cached is controlled by the new setting DOCUMENTS_PAGE_IMAGE_CACHE_TIME which defaults to 3600 seconds (1 hour). +- The document quick label selection field now uses a select2 widget. 3.0.1 (2018-07-08) ================= diff --git a/mayan/apps/documents/forms.py b/mayan/apps/documents/forms.py index 8bfdba6260..3b04491067 100644 --- a/mayan/apps/documents/forms.py +++ b/mayan/apps/documents/forms.py @@ -91,7 +91,12 @@ class DocumentForm(forms.ModelForm): ] = forms.ModelChoiceField( queryset=filenames_qs, required=False, - label=_('Quick document rename') + label=_('Quick document rename'), + widget=forms.Select( + attrs={ + 'class': 'select2' + } + ) ) def clean(self):