From 8b0f00500683e3260e06cccca627fc24a922f5d2 Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Tue, 21 Feb 2023 07:57:59 -0500 Subject: [PATCH] Fixed bug introduced by PR 1391 involving the saving up settings that have an associated text input. --- powerdnsadmin/templates/admin_setting_basic.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/powerdnsadmin/templates/admin_setting_basic.html b/powerdnsadmin/templates/admin_setting_basic.html index 5d1158a..3a84bb0 100644 --- a/powerdnsadmin/templates/admin_setting_basic.html +++ b/powerdnsadmin/templates/admin_setting_basic.html @@ -65,7 +65,7 @@ @@ -103,7 +103,8 @@ $(document.body).on('click', '.setting-save-button', function () { var setting = $(this).prop('id'); - var value = $(this).parents('tr').find('input[type="text"]')[0].value; + var target = $(this).data('target'); + var value = $('#' + target).val(); var postdata = { 'value': value, '_csrf_token': '{{ csrf_token() }}'