From 673ad97d7c8f5f57bf81e2ccde505eae0a738739 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 30 Oct 2022 19:07:09 +0530 Subject: [PATCH] common.js: updated serializeTableData() to allow specifying different alert placeholder. --- DnsServerCore/www/js/common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DnsServerCore/www/js/common.js b/DnsServerCore/www/js/common.js index 3a12ea59..bd6087b5 100644 --- a/DnsServerCore/www/js/common.js +++ b/DnsServerCore/www/js/common.js @@ -294,7 +294,7 @@ function sortTable(tableId, n) { } } -function serializeTableData(table, columns) { +function serializeTableData(table, columns, objAlertPlaceholder) { var data = table.find('input:text, input:checkbox, input:hidden, select'); var output = ""; @@ -319,13 +319,13 @@ function serializeTableData(table, columns) { var optional = (cell.attr("data-optional") === "true"); if ((cellValue === "") && !optional) { - showAlert("warning", "Missing!", "Please enter a valid value in the text field in focus."); + showAlert("warning", "Missing!", "Please enter a valid value in the text field in focus.", objAlertPlaceholder); cell.focus(); return false; } if (cellValue.includes("|")) { - showAlert("warning", "Invalid Character!", "Please edit the value in the text field in focus to remove '|' character."); + showAlert("warning", "Invalid Character!", "Please edit the value in the text field in focus to remove '|' character.", objAlertPlaceholder); cell.focus(); return false; }