Repository: kartoza/prj.app

Issue:
When creating a team, use a text box with ajax completion rather than a select list
When there are many members in an organisation it is impossible to manage and quickly select a person. We should ideally also show their name, not their user name.

![screen shot 2016-07-22 at 12 11 19 am](https://cloud.githubusercontent.com/assets/178003/17031959/f2f8cf26-4fa0-11e6-8300-1c103909fc77.png)

We should do the same anywhere else a user name is needed in a form.



Discussion:

Resolving patch:
diff --git a/django_project/changes/forms.py b/django_project/changes/forms.py
--- a/django_project/changes/forms.py
+++ b/django_project/changes/forms.py
@@ -182,7 +182,7 @@ def __init__(self, *args, **kwargs):
                 form_title,
                 Field('name', css_class='form-control'),
                 Field('address', css_class='form-control'),
-                Field('country', css_class='form-control'),
+                Field('country', css_class='form-control chosen-select'),
                 Field('sponsor_url', css_class='form-control'),
                 Field('contact_person', css_class='form-control'),
                 Field('sponsor_email', css_class='form-control'),
@@ -263,8 +263,8 @@ def __init__(self, *args, **kwargs):
         layout = Layout(
             Fieldset(
                 form_title,
-                Field('sponsor', css_class='form-control'),
-                Field('sponsorship_level', css_class='form-control'),
+                Field('sponsor', css_class='form-control chosen-select'),
+                Field('sponsorship_level', css_class='form-control chosen-select'),
                 Field('start_date', css_class='form-control'),
                 Field('end_date', css_class='form-control'),
                 css_id='project-form')
diff --git a/django_project/core/settings/project.py b/django_project/core/settings/project.py
--- a/django_project/core/settings/project.py
+++ b/django_project/core/settings/project.py
@@ -58,6 +58,7 @@
         'js/github-issue.js',
         'js/entry.js',
         'js/category.js',
+        'js/form.js',
     ),
     'output_filename': 'js/project.js',
 }
diff --git a/django_project/vota/forms.py b/django_project/vota/forms.py
--- a/django_project/vota/forms.py
+++ b/django_project/vota/forms.py
@@ -61,15 +61,17 @@ def __init__(self, *args, **kwargs):
                 form_title,
                 Field('name', css_class="form-control"),
                 Field('description', css_class="form-control"),
-                Field('chair', css_class="form-control"),
+                Field('chair', css_class="form-control chosen-select"),
                 Field('sort_number', css_class="form-control"),
                 Field('quorum_setting', css_class="form-control"),
-                Field('users', css_class="form-control"),
+                Field('users',
+                      css_class="form-control chosen-select bottom-dropdown ",
+                      data_placeholder="Choose users"
+                      ),
             )
         )
         self.helper.layout = layout
         self.helper.html5_required = False
-        self.helper.form_class = 'form-horizontal'
         self.helper.form_id = 'committee-form'
         super(CreateCommitteeForm, self).__init__(*args, **kwargs)
         self.helper.add_input(Submit('submit', 'Submit'))
@@ -118,7 +120,6 @@ def __init__(self, *args, **kwargs):
         )
         self.helper.layout = layout
         self.helper.html5_required = False
-        self.helper.form_class = 'form-horizontal'
         self.helper.form_id = 'committee-form'
         super(BallotCreateForm, self).__init__(*args, **kwargs)
         self.helper.add_input(Submit('submit', 'Submit'))


Test patch: