mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-29 04:50:34 +00:00
common.js: updated serializeTableData() to allow specifying different alert placeholder.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user