|
@@ -131,8 +131,9 @@ class OtherWebsites(InsecureForm):
|
|
|
validators=[Optional(), URL(require_tld=True)])
|
|
|
|
|
|
|
|
|
-STEP_CHOICES = [(k, LazyProxy(lambda k, s: u'%u - %s' % (k, s), k, STEPS[k], enable_cache=False)) for k in STEPS]
|
|
|
-
|
|
|
+def generate_choices(choices):
|
|
|
+ return [(k, LazyProxy(lambda k, s: u'%u - %s' % (k, s), k, choices[k], enable_cache=False))
|
|
|
+ for k in choices]
|
|
|
|
|
|
class ProjectForm(Form):
|
|
|
name = TextField(_(u'full name'),
|
|
@@ -186,16 +187,12 @@ class ProjectForm(Form):
|
|
|
validators=[Optional(), NumberRange(min=-180, max=180)])
|
|
|
|
|
|
step = SelectField(_(u'progress step'),
|
|
|
- choices=STEP_CHOICES, coerce=int)
|
|
|
+ choices=generate_choices(STEPS), coerce=int)
|
|
|
|
|
|
member_count = IntegerField(_(u'members'),
|
|
|
validators=[Optional(), NumberRange(min=0)],
|
|
|
description=[None, _(u'Number of members')])
|
|
|
|
|
|
- subscriber_count = IntegerField(_(u'subscribers'),
|
|
|
- validators=[Optional(), NumberRange(min=0)],
|
|
|
- description=[None, _(u'Number of subscribers to an internet access')])
|
|
|
-
|
|
|
tech_email = TextField(_('Email'),
|
|
|
validators=[Email(), DataRequired()], description=[None,
|
|
|
_('Technical contact, in case of problems with your submission')])
|
|
@@ -207,8 +204,9 @@ class ProjectForm(Form):
|
|
|
description=[None, _('Autonomous System (AS) number.')])
|
|
|
|
|
|
arcep_code = TextField(_(u'arcep code'),
|
|
|
- validators=[Optional()],
|
|
|
- description=[None, _(u'The identifier assigned by the ARCEP')])
|
|
|
+ validators=[Optional()], description=[None,
|
|
|
+ _(u'<a href="https://en.wikipedia.org/wiki/Autorit%%C3%%A9_de_R%%C3%%A9gulation_des_Communications_%%C3%%89lectroniques_et_des_Postes">Arcep</a> identifier')])
|
|
|
+ #description=[None, _(u'The identifier assigned by the ARCEP')])
|
|
|
|
|
|
xdsl = IntegerField(_(u'xdsl subscribers'),
|
|
|
validators=[Optional(), NumberRange(min=0)],
|
|
@@ -226,13 +224,13 @@ class ProjectForm(Form):
|
|
|
validators=[Optional(), NumberRange(min=0)],
|
|
|
description=[None, _(u'Number of fiber subscribers')])
|
|
|
|
|
|
- statutes = TextField(_(u'statutes',
|
|
|
+ statutes = TextField(_(u'statutes url',
|
|
|
validators=[Optional(), URL(require_tld=True)],
|
|
|
- description=[None, _(u'URL pointing to the organisation statutes.')]))
|
|
|
+ description=[None, _(u'URL pointing to the organisation statutes')]))
|
|
|
|
|
|
- internal_rules = TextField(_(u'internal rules',
|
|
|
+ internal_rules = TextField(_(u'internal rules url',
|
|
|
validators=[Optional(), URL(require_tld=True)],
|
|
|
- description=[None, _(u'URL pointing to the organisation internal rules.')]))
|
|
|
+ description=[_(u'URL pointing to the organisation internal rules'), _(u'URL pointing to the organisation internal rules')]))
|
|
|
|
|
|
internet_cube = BooleanField(_(u'internet cube'),
|
|
|
validators=[Optional()],
|
|
@@ -243,13 +241,13 @@ class ProjectForm(Form):
|
|
|
description=[None, _(u'Participating to the NL-NOG RING? See <code>https://ring.nlnog.net/</code>')])
|
|
|
|
|
|
ipv6_servers = SelectField(_(u'ipv6 servers'),
|
|
|
- choices=IPV6_SUPPORT,
|
|
|
+ choices=generate_choices(IPV6_SUPPORT),
|
|
|
coerce=int,
|
|
|
validators=[Optional()],
|
|
|
description=[None, _(u'Servers can be reached in IPV6?')])
|
|
|
|
|
|
ipv6_subscribers = SelectField(_(u'ipv6 subscribers'),
|
|
|
- choices=IPV6_SUPPORT, validators=[Optional()],
|
|
|
+ choices=generate_choices(IPV6_SUPPORT), validators=[Optional()],
|
|
|
coerce=int,
|
|
|
description=[None, _(u'Subscribers are provided with IPV6 connectivity?')])
|
|
|
|
|
@@ -317,7 +315,7 @@ class ProjectForm(Form):
|
|
|
optstr('asn', self.asn.data)
|
|
|
optstr('arcepCode', self.arcep_code.data)
|
|
|
optstr('internetcube', self.internet_cube.data)
|
|
|
- optstr('nlnogParticipant', self.nlnog_participant)
|
|
|
+ optstr('nlnogParticipant', self.nlnog_participant.data)
|
|
|
optobj('publicDocuments', {
|
|
|
'statutes': self.statutes.data,
|
|
|
'internalRules': self.internal_rules.data})
|