Revision 2ef98527
b/snf-astakos-app/astakos/im/forms.py | ||
---|---|---|
763 | 763 |
'limit_on_members_number') |
764 | 764 |
|
765 | 765 |
def __init__(self, *args, **kwargs): |
766 |
self.precursor_application = kwargs.get('instance') |
|
766 |
instance = kwargs.get('instance') |
|
767 |
self.precursor_application = instance |
|
767 | 768 |
super(ProjectApplicationForm, self).__init__(*args, **kwargs) |
769 |
if not instance: |
|
770 |
# remove closed join policy |
|
771 |
policies = PROJECT_MEMBER_JOIN_POLICIES.copy() |
|
772 |
policies.pop('3') |
|
773 |
self.fields['member_join_policy'].choices = policies.iteritems() |
|
768 | 774 |
|
769 | 775 |
def clean_start_date(self): |
770 | 776 |
start_date = self.cleaned_data.get('start_date') |
b/snf-astakos-app/astakos/im/settings.py | ||
---|---|---|
307 | 307 |
|
308 | 308 |
PROJECT_MEMBER_JOIN_POLICIES = getattr(settings, |
309 | 309 |
'ASTAKOS_PROJECT_MEMBER_JOIN_POLICIES', |
310 |
{'1':'automatically accepted by the system',
|
|
311 |
'2':'accepted by the owner of the project',
|
|
312 |
'3':'members can not join the project'})
|
|
310 |
{'1':'automatically accepted', |
|
311 |
'2':'owner accepts',
|
|
312 |
'3':'closed'})
|
|
313 | 313 |
|
314 | 314 |
PROJECT_MEMBER_LEAVE_POLICIES = getattr(settings, |
315 | 315 |
'ASTAKOS_PROJECT_MEMBER_LEAVE_POLICIES', |
316 |
{'1':'automatically accepted by the system', |
|
317 |
'2':'accepted by the owner of the project', |
|
318 |
'3':'members can not leave the project'}) |
|
316 |
{'1':'automatically accepted', |
|
317 |
'2':'owner accepts', |
|
318 |
'3':'closed'}) |
Also available in: Unified diff