mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
added freedns provider
This commit is contained in:
parent
98506f0fdd
commit
a57f86315e
@ -103,7 +103,8 @@ class ConfigureForm(forms.Form):
|
||||
('1', 'GnuDIP'),
|
||||
('2', 'noip.com'),
|
||||
('3', 'selfhost.bz'),
|
||||
('4', 'other update URL'))
|
||||
('4', 'freedns.afraid.org'),
|
||||
('5', 'other update URL'))
|
||||
|
||||
enabled = forms.BooleanField(label=_('Enable Dynamic DNS'),
|
||||
required=False)
|
||||
@ -294,7 +295,7 @@ def get_status():
|
||||
if not status['dynamicdns_server'] and not status['dynamicdns_update_url']:
|
||||
status['service_type'] = '1'
|
||||
elif not status['dynamicdns_server'] and status['dynamicdns_update_url']:
|
||||
status['service_type'] = '4'
|
||||
status['service_type'] = '5'
|
||||
else:
|
||||
status['service_type'] = '1'
|
||||
|
||||
|
||||
@ -41,13 +41,20 @@
|
||||
|
||||
{% block page_js %}
|
||||
<script type="text/javascript">
|
||||
|
||||
(function($) {
|
||||
var SELFHOST = 'https://carol.selfhost.de/update?username=<User>&' +
|
||||
'password=<Pass>&myip=<Ip>'
|
||||
var NOIP = 'http://dynupdate.no-ip.com/nic/update?hostname=' +
|
||||
'<Domain>&myip=<Ip>'
|
||||
var FREEDNS = 'http://freedns.afraid.org/dynamic/update.php?' +
|
||||
'_YOURAPIKEYHERE_'
|
||||
$('#dynamicdns-no-js').hide();
|
||||
$('.form-group').hide();
|
||||
$('#id_dynamicdns-enabled').closest('.form-group').show();
|
||||
if ($('#id_dynamicdns-enabled').prop('checked')) {
|
||||
show_all();
|
||||
configure_dropdown();
|
||||
|
||||
}
|
||||
|
||||
$('#id_dynamicdns-enabled').change(function() {
|
||||
@ -79,11 +86,6 @@
|
||||
|
||||
function configure_dropdown()
|
||||
{
|
||||
var SELFHOST = 'https://carol.selfhost.de/update?username=<User>&' +
|
||||
'password=<Pass>&myip=<Ip>'
|
||||
var NOIP = 'http://dynupdate.no-ip.com/nic/update?hostname=<' +
|
||||
'Domain>&myip=<Ip>'
|
||||
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "GnuDIP") {
|
||||
$('#id_dynamicdns-dynamicdns_update_url').closest('.form-group').hide();
|
||||
$('#id_dynamicdns-disable_SSL_cert_check').closest('.form-group').hide();
|
||||
@ -103,6 +105,9 @@
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "selfhost.bz") {
|
||||
$('#id_dynamicdns-dynamicdns_update_url').val(SELFHOST);
|
||||
}
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "freedns.afraid.org") {
|
||||
$('#id_dynamicdns-dynamicdns_update_url').val(FREEDNS);
|
||||
}
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "other update URL") {
|
||||
$('#id_dynamicdns-dynamicdns_update_url').val('');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user