Added view to add or remove users from group, merged common code and moved it to common.utils

This commit is contained in:
Roberto Rosario
2011-05-08 04:15:29 -04:00
parent 5a156bf23d
commit 7cc768305f
8 changed files with 125 additions and 31 deletions

View File

@@ -14,15 +14,3 @@ class RoleForm(forms.ModelForm):
class RoleForm_view(DetailForm):
class Meta:
model = Role
class ChoiceForm(forms.Form):
def __init__(self, *args, **kwargs):
choices = kwargs.pop('choices', [])
label = kwargs.pop('label', _(u'Selection'))
super(ChoiceForm, self).__init__(*args, **kwargs)
self.fields['selection'].choices = choices
self.fields['selection'].label = label
self.fields['selection'].widget.attrs.update({'size': 14})
selection = forms.MultipleChoiceField()