|
@@ -104,8 +104,7 @@ class Unique(object):
|
|
|
TECHNOLOGIES_CHOICES = (
|
|
|
('ftth', _('FTTH')),
|
|
|
('fttb', _('FTTB')),
|
|
|
- ('dsl', _('DSL')),
|
|
|
- ('cube', _('Internet Cube')),
|
|
|
+ ('xdsl', _('xDSL')),
|
|
|
('wifi', _('Wi-Fi')),
|
|
|
('vpn', _('VPN')),
|
|
|
)
|
|
@@ -131,6 +130,12 @@ class OtherWebsites(InsecureForm):
|
|
|
validators=[Optional(), URL(require_tld=True)])
|
|
|
|
|
|
|
|
|
+class SubscriptionCount(InsecureForm):
|
|
|
+ subscription_types = SelectMultipleField(_(u'service'), choices=TECHNOLOGIES_CHOICES,
|
|
|
+ widget=partial(Select(True), **{'class': 'selectpicker', 'data-title': _(u'Service')}))
|
|
|
+ subscription_count = IntegerField(_(u'subscribers'), widget=partial(TextInput(), class_='input-small'), validators=[Optional(), NumberRange(min=0)])
|
|
|
+
|
|
|
+
|
|
|
STEP_CHOICES = [(k, LazyProxy(lambda k, s: u'%u - %s' % (k, s), k, STEPS[k], enable_cache=False)) for k in STEPS]
|
|
|
|
|
|
|
|
@@ -164,8 +169,9 @@ class ProjectForm(Form):
|
|
|
step = SelectField(_(u'progress step'), choices=STEP_CHOICES, coerce=int)
|
|
|
member_count = IntegerField(_(u'members'), validators=[Optional(), NumberRange(min=0)],
|
|
|
description=[None, _('Number of members')])
|
|
|
- subscriber_count = IntegerField(_(u'subscribers'), validators=[Optional(), NumberRange(min=0)],
|
|
|
- description=[None, _('Number of subscribers to an internet access')])
|
|
|
+ subscriber_count = FieldList(MyFormField(SubscriptionCount, _('Subscription count by service'), widget=partial(InputListWidget(), class_='formfield')),
|
|
|
+ min_entries=1, widget=InputListWidget(),
|
|
|
+ description=[None, _(u'Number of subscriptions')])
|
|
|
|
|
|
tech_email = TextField(_('Email'), validators=[Email(), DataRequired()], description=[None,
|
|
|
_('Technical contact, in case of problems with your submission')])
|