Revision 213ba781

b/snf-astakos-app/astakos/im/forms.py
56 56
from astakos.im.models import (
57 57
    AstakosUser, EmailChange, Invitation,
58 58
    Resource, PendingThirdPartyUser, get_latest_terms, RESOURCE_SEPARATOR,
59
    ProjectApplication)
59
    ProjectApplication, MemberJoinPolicy, MemberLeavePolicy)
60 60
from astakos.im.settings import (
61 61
    INVITATIONS_PER_LEVEL, BASEURL, SITENAME, RECAPTCHA_PRIVATE_KEY,
62 62
    RECAPTCHA_ENABLED, DEFAULT_CONTACT_EMAIL, LOGGING_LEVEL,
......
633 633
            _(astakos_messages.DOMAIN_VALUE_ERR),
634 634
            'invalid'
635 635
        )],
636
        widget=forms.TextInput(attrs={'placeholder': 'myproject.mylab.ntua.gr'}),
637
        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 "
636
        widget=forms.TextInput(
637
            attrs={'placeholder': 'myproject.mylab.ntua.gr'}),
638
            help_text="""The Project's name should be in a domain format.
639
                         The domain shouldn't neccessarily exist in the real
640
                         world but is helpful to imply a structure.
641
                         e.g.: myproject.mylab.ntua.gr or
642
                         myservice.myteam.myorganization"""
638 643
    )
639 644
    homepage = forms.URLField(
640 645
        label="Homepage Url",
641
        help_text="This should be a URL pointing at your project's site. e.g.: http://myproject.com ",
646
        help_text="""This should be a URL pointing at your project's site.
647
                     e.g.: http://myproject.com""",
642 648
        widget=forms.TextInput(attrs={'placeholder': 'http://myproject.com'}),
643 649

  
644 650
        required=False
645 651
     )
646 652
    comments = forms.CharField(widget=forms.Textarea, required=False)
653
    member_join_policy = forms.ModelChoiceField(
654
        queryset=MemberJoinPolicy.objects.all(),
655
        empty_label=None)
656
    member_leave_policy = forms.ModelChoiceField(
657
        queryset=MemberLeavePolicy.objects.all(),
658
        empty_label=None)
659

  
647 660

  
648 661
    class Meta:
649 662
        model = ProjectApplication
b/snf-astakos-app/astakos/im/models.py
1000 1000
    description = models.CharField(_('Description'), max_length=80)
1001 1001

  
1002 1002
    def __str__(self):
1003
        return self.policy
1003
        return self.description.capitalize()
1004 1004

  
1005 1005
class MemberLeavePolicy(models.Model):
1006 1006
    policy = models.CharField(_('Policy'), max_length=255, unique=True, db_index=True)
1007 1007
    description = models.CharField(_('Description'), max_length=80)
1008 1008

  
1009 1009
    def __str__(self):
1010
        return self.policy
1010
        return self.description.capitalize()
1011 1011

  
1012 1012
def synced_model_metaclass(class_name, class_parents, class_attributes):
1013 1013

  
......
1141 1141
                                                     blank=True,
1142 1142
                                                     db_index=True)
1143 1143

  
1144
    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 ",)
1144
    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 ",)
1145 1145
    homepage                =   models.URLField(max_length=255, null=True,
1146 1146
                                                blank=True,help_text="This should be a URL pointing at your project's site. e.g.: http://myproject.com ",)
1147 1147
    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. ")

Also available in: Unified diff