Ignore:
Timestamp:
Sep 15, 2011, 4:19:05 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
ba08462
Parents:
5c68184
git-author:
Alex Dehnert <adehnert@…> (09/15/11 16:19:05)
git-committer:
Alex Dehnert <adehnert@…> (09/15/11 16:19:05)
Message:

Limit to active groups for the membership forms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    r5c68184 rb1a8ea7  
    1414from django.forms import Form
    1515from django.forms import ModelForm
    16 from django.forms import ModelChoiceField
     16from django.forms import ModelChoiceField, ModelMultipleChoiceField
    1717from django.db.models import Q
    1818
     
    226226
    227227class Form_GroupMembershipUpdate(ModelForm):
     228    group = ModelChoiceField(queryset=groups.models.Group.active_groups.all())
     229
    228230    def __init__(self, *args, **kwargs):
    229231        super(Form_GroupMembershipUpdate, self).__init__(*args, **kwargs)
     
    322324
    323325class Form_PersonMembershipUpdate(ModelForm):
     326    groups = ModelMultipleChoiceField(queryset=groups.models.Group.active_groups.all())
    324327    class Meta:
    325328        model = forms.models.PersonMembershipUpdate
Note: See TracChangeset for help on using the changeset viewer.