diff --git a/scripts/pi-hole/js/groups-clients.js b/scripts/pi-hole/js/groups-clients.js index a0d8faea..ea27f602 100644 --- a/scripts/pi-hole/js/groups-clients.js +++ b/scripts/pi-hole/js/groups-clients.js @@ -459,6 +459,7 @@ function addClient() { utils.enableAll(); utils.listsAlert("client", ips, data); reloadClientSuggestions(); + $("#new_comment").val(""); table.ajax.reload(null, false); table.rows().deselect(); diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index c430e560..6e62f7d2 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -553,6 +553,10 @@ function addDomain() { success: function (data) { utils.enableAll(); utils.listsAlert("domain", domains, data); + $("#new_domain").val(""); + $("#new_domain_comment").val(""); + $("#new_regex").val(""); + $("#new_regex_comment").val(""); table.ajax.reload(null, false); table.rows().deselect(); diff --git a/scripts/pi-hole/js/groups-lists.js b/scripts/pi-hole/js/groups-lists.js index cf859a9c..c0768501 100644 --- a/scripts/pi-hole/js/groups-lists.js +++ b/scripts/pi-hole/js/groups-lists.js @@ -529,6 +529,8 @@ function addList(event) { success: function (data) { utils.enableAll(); utils.listsAlert("list", addresses, data); + $("#new_address").val(""); + $("#new_comment").val(""); table.ajax.reload(null, false); table.rows().deselect(); diff --git a/scripts/pi-hole/js/settings-dns-records.js b/scripts/pi-hole/js/settings-dns-records.js index d48df91a..cf288b5d 100644 --- a/scripts/pi-hole/js/settings-dns-records.js +++ b/scripts/pi-hole/js/settings-dns-records.js @@ -225,6 +225,8 @@ $(document).ready(function () { .done(function () { utils.enableAll(); utils.showAlert("success", "fas fa-plus", "Successfully added DNS record", elem); + $("#Hdomain").val(""); + $("#Hip").val(""); $("#hosts-Table").DataTable().ajax.reload(null, false); }) .fail(function (data, exception) { @@ -249,6 +251,8 @@ $(document).ready(function () { .done(function () { utils.enableAll(); utils.showAlert("success", "fas fa-plus", "Successfully added CNAME record", elem); + $("#Cdomain").val(""); + $("#Ctarget").val(""); $("#cnameRecords-Table").DataTable().ajax.reload(null, false); }) .fail(function (data, exception) {