Clean text fields after success.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign
2022-05-17 15:54:01 -03:00
parent 7cb2231bdd
commit d12ec5f885
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -87,6 +87,10 @@ function addCustomCNAME() {
"Custom CNAME added",
domain + ": " + target
);
// Clean up field values and reload table data
$("#domain").val("");
$("#target").val("");
table.ajax.reload();
} else {
utils.showAlert("error", "fas fa-times", "Failure! Something went wrong", response.message);
@@ -120,6 +124,10 @@ function deleteCustomCNAME() {
"Custom CNAME deleted",
domain + ": " + target
);
// Clean up field values and reload table data
$("#domain").val("");
$("#target").val("");
table.ajax.reload();
} else {
utils.showAlert("error", "fas fa-times", "Failure! Something went wrong", response.message);
+8
View File
@@ -81,6 +81,10 @@ function addCustomDNS() {
utils.enableAll();
if (response.success) {
utils.showAlert("success", "far fa-check-circle", "Custom DNS added", domain + ": " + ip);
// Clean up field values and reload table data
$("#domain").val("");
$("#id").val("");
table.ajax.reload();
} else {
utils.showAlert("error", "fas fa-times", "Failure! Something went wrong", response.message);
@@ -109,6 +113,10 @@ function deleteCustomDNS() {
utils.enableAll();
if (response.success) {
utils.showAlert("success", "far fa-check-circle", "Custom DNS deleted", domain + ": " + ip);
// Clean up field values and reload table data
$("#domain").val("");
$("#id").val("");
table.ajax.reload();
} else {
utils.showAlert("error", "fas fa-times", "Failure! Something went wrong", response.message);