diff --git a/scipost_django/profiles/forms.py b/scipost_django/profiles/forms.py index 7a84157db81ec75dc978270dad38dff0989ab312..9b26bebf94c45119013b86441475dcc9f1e8353c 100644 --- a/scipost_django/profiles/forms.py +++ b/scipost_django/profiles/forms.py @@ -92,8 +92,16 @@ class SimpleProfileForm(ProfileForm): class ProfileMergeForm(forms.Form): - to_merge = ModelChoiceFieldwithid(queryset=Profile.objects.all(), empty_label=None) - to_merge_into = ModelChoiceFieldwithid(queryset=Profile.objects.all(), empty_label=None) + to_merge = ModelChoiceFieldwithid( + queryset=Profile.objects.all(), + widget=autocomplete.ModelSelect2(url='/profiles/profile-autocomplete'), + empty_label=None + ) + to_merge_into = ModelChoiceFieldwithid( + queryset=Profile.objects.all(), + widget=autocomplete.ModelSelect2(url='/profiles/profile-autocomplete'), + empty_label=None + ) def clean(self): """ diff --git a/scipost_django/profiles/templates/profiles/profile_duplicate_list.html b/scipost_django/profiles/templates/profiles/profile_duplicate_list.html index d3a30bbc7997d13fea659a3a6dfa28aadfeb89af..74b93d467ee68d5ea2d31f54340c58c1ae4a387f 100644 --- a/scipost_django/profiles/templates/profiles/profile_duplicate_list.html +++ b/scipost_django/profiles/templates/profiles/profile_duplicate_list.html @@ -42,3 +42,7 @@ </div> {% endblock content %} + +{% block footer_script %} + {{ merge_form.media }} +{% endblock footer_script %}