mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
do not delete GnuDIP Server address if dropdown box changes and check/uncheck HTTP Basic auth according to update URL provider template
This commit is contained in:
parent
45960542bb
commit
7d44f0c4e4
@ -318,6 +318,11 @@ def _apply_changes(request, old_status, new_status):
|
||||
if new_status['dynamicdns_server'] == '':
|
||||
new_status['dynamicdns_server'] = EMPTYSTRING
|
||||
|
||||
if new_status['service_type'] == 'GnuDIP':
|
||||
new_status['dynamicdns_ipurl'] = EMPTYSTRING
|
||||
else:
|
||||
new_status['dynamicdns_server'] = EMPTYSTRING
|
||||
|
||||
if old_status != new_status:
|
||||
disable_ssl_check = "disabled"
|
||||
use_http_basic_auth = "disabled"
|
||||
|
||||
@ -85,7 +85,6 @@
|
||||
'Domain>&myip=<Ip>'
|
||||
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "GnuDIP") {
|
||||
document.getElementById('id_dynamicdns-dynamicdns_update_url').value = '';
|
||||
$('#id_dynamicdns-dynamicdns_update_url').closest('.form-group').hide();
|
||||
$('#id_dynamicdns-disable_SSL_cert_check').closest('.form-group').hide();
|
||||
$('#id_dynamicdns-use_http_basic_auth').closest('.form-group').hide();
|
||||
@ -97,6 +96,9 @@
|
||||
$('#id_dynamicdns-dynamicdns_server').closest('.form-group').hide();
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "noip.com") {
|
||||
$('#id_dynamicdns-dynamicdns_update_url').val(NOIP);
|
||||
$('#id_dynamicdns-use_http_basic_auth').prop('checked', true);
|
||||
}else{
|
||||
$('#id_dynamicdns-use_http_basic_auth').prop('checked', false);
|
||||
}
|
||||
if ($("#id_dynamicdns-service_type option:selected").text() == "selfhost.bz") {
|
||||
$('#id_dynamicdns-dynamicdns_update_url').val(SELFHOST);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user