aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2018-10-26 11:43:48 -0400
committerParker Berberian <pberberian@iol.unh.edu>2018-10-26 11:43:48 -0400
commit9279907efbb91b982e93242a68cab6f67a845b2b (patch)
tree16fbb5ca685bcb8ec5486a8dcb94551c1e56e399 /src/workflow
parentebc42347105caa2be52a8337372ae4793fe9182c (diff)
Improved Collaborators UX
Some small improvements based on feedback from Trevor. - Changed lable from "users" to "collaborators" to try and be more clear - Do not show your own name in the dropdown by default - You cannot select yourself as a collaborator Change-Id: Ie2e9070232765ed9eabe6657924ed8addaa0165a Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/workflow')
-rw-r--r--src/workflow/forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/workflow/forms.py b/src/workflow/forms.py
index c770e38..d4abbc3 100644
--- a/src/workflow/forms.py
+++ b/src/workflow/forms.py
@@ -189,6 +189,7 @@ class BookingMetaForm(forms.Form):
default_user = kwargs.pop("default_user")
else:
default_user = "you"
+ self.default_user = default_user
if "chosen_users" in kwargs:
chosen_users = kwargs.pop("chosen_users")
elif data and "users" in data:
@@ -212,7 +213,7 @@ class BookingMetaForm(forms.Form):
"""
try:
users = {}
- d_qset = UserProfile.objects.select_related('user').all();
+ d_qset = UserProfile.objects.select_related('user').all().exclude(user__username=self.default_user);
for userprofile in d_qset:
user = {
'id':userprofile.user.id,
@@ -237,7 +238,6 @@ class BookingMetaForm(forms.Form):
'selectable_limit': -1,
'name': "users",
'placeholder': "username",
- 'default_entry': default_user,
'initial': chosen_users,
'edit': False
}