generated from jric11/baseProject
Chat's updates for security, db and workflow
Security and workflow regressions / regression (push) Has been cancelled
Security and workflow regressions / regression (push) Has been cancelled
This commit is contained in:
+8
-17
@@ -3,7 +3,7 @@
|
||||
// Add Dropdowntype
|
||||
// ================
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
var $application = $("#APPLICATION_MNEMONIC").val(),
|
||||
$sessionStorage = JSON.parse(sessionStorage.getItem($application) || "{}");
|
||||
@@ -12,7 +12,7 @@ $(document).ready(function() {
|
||||
// Save Button
|
||||
// -----------
|
||||
|
||||
$(".btnSave").on("click", function(e) {
|
||||
$(".btnSave").on("click", async function (e) {
|
||||
e.preventDefault();
|
||||
$("#addDropdowntype").submit();
|
||||
});
|
||||
@@ -21,7 +21,7 @@ $(document).ready(function() {
|
||||
// Cancel Button.
|
||||
// --------------
|
||||
|
||||
$(".btnCancel").on("click", function() {
|
||||
$(".btnCancel").on("click", async function () {
|
||||
formSubmit({ action : $sessionStorage.addDropdowntype });
|
||||
});
|
||||
|
||||
@@ -29,7 +29,8 @@ $(document).ready(function() {
|
||||
// Validate Inputs
|
||||
// ---------------
|
||||
|
||||
$("#addDropdowntype").submit( function(e) {
|
||||
$("#addDropdowntype").submit( async function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dropdowntype_name = $("#dropdowntype_name"),
|
||||
dropdowntype_title = $("#dropdowntype_title"),
|
||||
@@ -48,7 +49,7 @@ $(document).ready(function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (formPost({ action : "Dropdowns.dropdowntypeExists", dropdowntype_serial : 0, dropdowntype_name : dropdowntype_name.val() }) === true) {
|
||||
if (await formPost({ action : "Dropdowns.dropdowntypeExists", dropdowntype_serial : 0, dropdowntype_name : dropdowntype_name.val() }) === true) {
|
||||
createInputError(dropdowntype_name, "Name already exists");
|
||||
return false;
|
||||
}
|
||||
@@ -58,26 +59,16 @@ $(document).ready(function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (formPost({ action : "Dropdowns.dropdowntypetitleExists", dropdowntype_serial : 0, dropdowntype_title : dropdowntype_title.val() }) === true) {
|
||||
if (await formPost({ action : "Dropdowns.dropdowntypetitleExists", dropdowntype_serial : 0, dropdowntype_title : dropdowntype_title.val() }) === true) {
|
||||
createInputError(dropdowntype_title, "Title already exists");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isBlank(dropdowntype_table)) {
|
||||
createInputError(dropdowntype_table, "Table is required");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isBlank(dropdowntype_column)) {
|
||||
createInputError(dropdowntype_column, "Column is required");
|
||||
return false;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$.post("./", $(this).serialize())
|
||||
|
||||
.done(function() {
|
||||
.done(function () {
|
||||
|
||||
$sessionStorage.action = $sessionStorage.addDropdowntype || "";
|
||||
$sessionStorage.toast = "Dropdown Type was Added";
|
||||
|
||||
Reference in New Issue
Block a user