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:
Daniel Steglich 2015-03-06 21:21:19 +01:00
parent 45960542bb
commit 7d44f0c4e4
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View File

@ -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);