mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
moved helper texts to variables
This commit is contained in:
parent
eab3ac2cfc
commit
2c63aaeb06
@ -72,23 +72,45 @@ class ConfigureForm(forms.Form):
|
|||||||
"""Form to configure the dynamic DNS client"""
|
"""Form to configure the dynamic DNS client"""
|
||||||
|
|
||||||
hlp_updt_url = 'The Variables <User>, <Pass>, <Ip>, \
|
hlp_updt_url = 'The Variables <User>, <Pass>, <Ip>, \
|
||||||
<Domain> may be used.'
|
<Domain> may be used within the URL. For details\
|
||||||
|
see the update URL templates of the example providers.'
|
||||||
|
|
||||||
hlp_services = 'Please choose a update protocol according to your \
|
hlp_services = 'Please choose a update protocol according to your \
|
||||||
provider. If your provider does not support the GnudIP \
|
provider. If your provider does not support the GnudIP \
|
||||||
protocol or your provider is not listed you may use \
|
protocol or your provider is not listed you may use \
|
||||||
the update URL of your provider.'
|
the update URL of your provider.'
|
||||||
|
|
||||||
|
hlp_disable_ssl = 'use this option if your provider uses self signed \
|
||||||
|
certificates'
|
||||||
|
|
||||||
|
hlp_secret = 'You should have been requested to select a password \
|
||||||
|
when you created the account. Leave this field empty \
|
||||||
|
if you want to keep your previous configured password.'
|
||||||
|
|
||||||
|
hlp_ipurl = 'Optional Value. If your FreedomBox is not connected \
|
||||||
|
directly to the Internet (i.e. connected to a NAT \
|
||||||
|
router) this URL is used to figure out the real Internet \
|
||||||
|
IP. The URL should simply return the IP where the \
|
||||||
|
client comes from. Example: \
|
||||||
|
http://myip.datasystems24.de'
|
||||||
|
|
||||||
|
hlp_user = 'You should have been requested to select a username \
|
||||||
|
when you created the account'
|
||||||
|
|
||||||
|
"""ToDo: sync this list with the html template file"""
|
||||||
|
provider_choices = (
|
||||||
|
('1', 'GnuDIP'),
|
||||||
|
('2', 'noip.com'),
|
||||||
|
('3', 'selfhost.bz'),
|
||||||
|
('4', 'other Update URL'))
|
||||||
|
|
||||||
enabled = forms.BooleanField(label=_('Enable Dynamic DNS'),
|
enabled = forms.BooleanField(label=_('Enable Dynamic DNS'),
|
||||||
required=False, widget=forms.CheckboxInput
|
required=False, widget=forms.CheckboxInput
|
||||||
(attrs={'onclick': 'mod_form();'}))
|
(attrs={'onclick': 'mod_form();'}))
|
||||||
|
|
||||||
service_type = forms.ChoiceField(label=_('Service type'),
|
service_type = forms.ChoiceField(label=_('Service type'),
|
||||||
help_text=_(hlp_services),
|
help_text=_(hlp_services),
|
||||||
choices=(('1', 'GnuDIP'),
|
choices=provider_choices,
|
||||||
('2', 'noip.com'),
|
|
||||||
('3', 'selfhost.bz'),
|
|
||||||
('4', 'other Update URL')),
|
|
||||||
widget=forms.Select(attrs={'onChange':
|
widget=forms.Select(attrs={'onChange':
|
||||||
'dropdown()'}))
|
'dropdown()'}))
|
||||||
|
|
||||||
@ -106,10 +128,7 @@ class ConfigureForm(forms.Form):
|
|||||||
|
|
||||||
disable_SSL_cert_check = forms.BooleanField(label=_('accept all SSL \
|
disable_SSL_cert_check = forms.BooleanField(label=_('accept all SSL \
|
||||||
certificates'),
|
certificates'),
|
||||||
help_text=_('use this option \
|
help_text=_(hlp_disable_ssl),
|
||||||
if your provider \
|
|
||||||
uses self signed\
|
|
||||||
certificates'),
|
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
use_http_basic_auth = forms.BooleanField(label=_('use HTTP basic \
|
use_http_basic_auth = forms.BooleanField(label=_('use HTTP basic \
|
||||||
@ -125,15 +144,12 @@ class ConfigureForm(forms.Form):
|
|||||||
|
|
||||||
dynamicdns_user = TrimmedCharField(
|
dynamicdns_user = TrimmedCharField(
|
||||||
label=_('Username'),
|
label=_('Username'),
|
||||||
help_text=_('You should have been requested to select a username \
|
help_text=_(hlp_user))
|
||||||
when you created the account'))
|
|
||||||
|
|
||||||
dynamicdns_secret = TrimmedCharField(
|
dynamicdns_secret = TrimmedCharField(
|
||||||
label=_('Password'), widget=forms.PasswordInput(),
|
label=_('Password'), widget=forms.PasswordInput(),
|
||||||
required=False,
|
required=False,
|
||||||
help_text=_('You should have been requested to select a password \
|
help_text=_(hlp_secret))
|
||||||
when you created the account. Leave this field empty \
|
|
||||||
if you want to keep your previous configured password.'))
|
|
||||||
|
|
||||||
showpw = forms.BooleanField(label=_('show password'),
|
showpw = forms.BooleanField(label=_('show password'),
|
||||||
required=False,
|
required=False,
|
||||||
@ -143,12 +159,7 @@ class ConfigureForm(forms.Form):
|
|||||||
dynamicdns_ipurl = TrimmedCharField(
|
dynamicdns_ipurl = TrimmedCharField(
|
||||||
label=_('IP check URL'),
|
label=_('IP check URL'),
|
||||||
required=False,
|
required=False,
|
||||||
help_text=_('Optional Value. If your FreedomBox is not connected \
|
help_text=_(hlp_ipurl),
|
||||||
directly to the Internet (i.e. connected to a NAT \
|
|
||||||
router) this URL is used to figure out the real Internet \
|
|
||||||
IP. The URL should simply return the IP where the \
|
|
||||||
client comes from. Example: \
|
|
||||||
http://myip.datasystems24.de'),
|
|
||||||
validators=[
|
validators=[
|
||||||
validators.URLValidator(schemes=['http', 'https', 'ftp'])])
|
validators.URLValidator(schemes=['http', 'https', 'ftp'])])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user