diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-04 17:52:17 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-04 17:52:17 +0200 |
commit | 87df7fd7357f3210953038bff58477319e12b6fc (patch) | |
tree | cf5da383b3ed46de875ee25ec625b0218c2da35a /ishtar_common/forms_common.py | |
parent | daee77bd657f0e72767d64dd92f36008e1c47676 (diff) | |
download | Ishtar-87df7fd7357f3210953038bff58477319e12b6fc.tar.bz2 Ishtar-87df7fd7357f3210953038bff58477319e12b6fc.zip |
QA person: bulk modification
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index b91f55ace..df103e541 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -44,7 +44,7 @@ from ishtar_common.templatetags.link_to_window import simple_link_to_window from forms import FinalForm, FormSet, reverse_lazy, name_validator, \ TableSelect, ManageOldType, CustomForm, FieldType, FormHeader, \ FormSetWithDeleteSwitches, BSForm, get_data_from_formset, \ - file_size_validator, HistorySelect + file_size_validator, HistorySelect, CustomFormSearch, QAForm from ishtar_common.utils import is_downloadable, clean_session_cache, \ max_size_help @@ -469,7 +469,7 @@ class BaseOrganizationForm(forms.ModelForm): 'town', 'postal_code'] -class PersonSelect(TableSelect): +class PersonSelect(CustomForm, TableSelect): _model = models.Person search_vector = forms.CharField( @@ -492,7 +492,7 @@ class PersonSelect(TableSelect): self.fields['person_types'].choices = models.PersonType.get_types() -class PersonFormSelection(forms.Form): +class PersonFormSelection(CustomFormSearch): SEARCH_AND_SELECT = True form_label = _(u"Person search") associated_models = {'pk': models.Person} @@ -505,6 +505,27 @@ class PersonFormSelection(forms.Form): validators=[models.valid_id(models.Person)]) +class QAPersonFormMulti(QAForm): + form_admin_name = _(u"Person - Quick action - Modify") + form_slug = "person-quickaction-modify" + base_models = ['qa_title_type'] + associated_models = { + 'qa_title': models.TitleType, + } + + MULTI = True + REPLACE_FIELDS = [ + 'qa_title', + ] + qa_title = forms.ChoiceField( + label=_(u"Title"), required=False + ) + + TYPES = [ + FieldType('qa_title', models.TitleType), + ] + + class PersonMergeFormSelection(ManualMerge, forms.Form): SEARCH_AND_SELECT = True form_label = _("Person to merge") |