Commit b4131834 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Project form/summary fixes

- Sane member join default value
- Fix summary join/leave policy display
parent a5a1b64f
...@@ -707,7 +707,7 @@ class ProjectApplicationForm(forms.ModelForm): ...@@ -707,7 +707,7 @@ class ProjectApplicationForm(forms.ModelForm):
homepage = forms.URLField( homepage = forms.URLField(
label = app_home_label, label = app_home_label,
help_text = app_home_help, help_text = app_home_help,
widget = app_home_widget, widget = app_home_widget,
required = False) required = False)
...@@ -732,12 +732,15 @@ class ProjectApplicationForm(forms.ModelForm): ...@@ -732,12 +732,15 @@ class ProjectApplicationForm(forms.ModelForm):
label = app_end_date_label, label = app_end_date_label,
help_text = app_end_date_help) help_text = app_end_date_help)
member_join_policy = forms.ChoiceField( member_join_policy = forms.TypedChoiceField(
label = join_policy_label, label = join_policy_label,
initial = 2,
coerce = int,
choices = join_policies) choices = join_policies)
member_leave_policy = forms.ChoiceField( member_leave_policy = forms.TypedChoiceField(
label = leave_policy_label, label = leave_policy_label,
coerce = int,
choices = leave_policies) choices = leave_policies)
limit_on_members_number = forms.IntegerField( limit_on_members_number = forms.IntegerField(
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<h3>MEMBERSHIP OPTIONS</h3> <h3>MEMBERSHIP OPTIONS</h3>
<dl class="alt-style"> <dl class="alt-style">
<dt>Member join policy</dt> <dt>Member join policy</dt>
<dd>{{ join_policies|lookup:form_data.member_join_policy }}</dd> <dd>{{ join_policies|lookup:form_data.member_join_policy|title }}</dd>
<dt>Member leave policy</dt> <dt>Member leave policy</dt>
<dd>{{ leave_policies|lookup:form_data.member_leave_policy }}</dd> <dd>{{ leave_policies|lookup:form_data.member_leave_policy|title }}</dd>
<dt>Total number of members</dt> <dt>Total number of members</dt>
<dd>{{ form_data.limit_on_members_number }}</dd> <dd>{{ form_data.limit_on_members_number }}</dd>
</dl> </dl>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment