Commit 0ab70583 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

More informative member join/leave policies

parent b5e43c80
......@@ -56,7 +56,7 @@ from django.contrib.auth.models import AnonymousUser
from astakos.im.models import (
AstakosUser, EmailChange, Invitation,
Resource, PendingThirdPartyUser, get_latest_terms, RESOURCE_SEPARATOR,
ProjectApplication)
ProjectApplication, MemberJoinPolicy, MemberLeavePolicy)
from astakos.im.settings import (
INVITATIONS_PER_LEVEL, BASEURL, SITENAME, RECAPTCHA_PRIVATE_KEY,
RECAPTCHA_ENABLED, DEFAULT_CONTACT_EMAIL, LOGGING_LEVEL,
......@@ -633,17 +633,30 @@ class ProjectApplicationForm(forms.ModelForm):
_(astakos_messages.DOMAIN_VALUE_ERR),
'invalid'
)],
widget=forms.TextInput(attrs={'placeholder': 'myproject.mylab.ntua.gr'}),
help_text=" The Project's name should be in a domain format. The domain shouldn't neccessarily exist in the real world but is helpful to imply a structure. e.g.: myproject.mylab.ntua.gr or myservice.myteam.myorganization "
widget=forms.TextInput(
attrs={'placeholder': 'myproject.mylab.ntua.gr'}),
help_text="""The Project's name should be in a domain format.
The domain shouldn't neccessarily exist in the real
world but is helpful to imply a structure.
e.g.: myproject.mylab.ntua.gr or
myservice.myteam.myorganization"""
)
homepage = forms.URLField(
label="Homepage Url",
help_text="This should be a URL pointing at your project's site. e.g.: http://myproject.com ",
help_text="""This should be a URL pointing at your project's site.
e.g.: http://myproject.com""",
widget=forms.TextInput(attrs={'placeholder': 'http://myproject.com'}),
required=False
)
comments = forms.CharField(widget=forms.Textarea, required=False)
member_join_policy = forms.ModelChoiceField(
queryset=MemberJoinPolicy.objects.all(),
empty_label=None)
member_leave_policy = forms.ModelChoiceField(
queryset=MemberLeavePolicy.objects.all(),
empty_label=None)
class Meta:
model = ProjectApplication
......
......@@ -1000,14 +1000,14 @@ class MemberJoinPolicy(models.Model):
description = models.CharField(_('Description'), max_length=80)
def __str__(self):
return self.policy
return self.description.capitalize()
class MemberLeavePolicy(models.Model):
policy = models.CharField(_('Policy'), max_length=255, unique=True, db_index=True)
description = models.CharField(_('Description'), max_length=80)
def __str__(self):
return self.policy
return self.description.capitalize()
def synced_model_metaclass(class_name, class_parents, class_attributes):
......@@ -1141,7 +1141,7 @@ class ProjectApplication(models.Model):
blank=True,
db_index=True)
name = models.CharField(max_length=80, help_text=" The Project's name should be in a domain format. The domain shouldn't neccessarily exist in the real world but is helpful to imply a structure. e.g.: myproject.mylab.ntua.gr or myservice.myteam.myorganization ",)
name = models.CharField(max_length=80, help_text="The Project's name should be in a domain format. The domain shouldn't neccessarily exist in the real world but is helpful to imply a structure. e.g.: myproject.mylab.ntua.gr or myservice.myteam.myorganization ",)
homepage = models.URLField(max_length=255, null=True,
blank=True,help_text="This should be a URL pointing at your project's site. e.g.: http://myproject.com ",)
description = models.TextField(null=True, blank=True,help_text= "Please provide a short but descriptive abstract of your Project, so that anyone searching can quickly understand what this Project is about. ")
......
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