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:
+11
-10
@@ -3,7 +3,7 @@
|
||||
// Edit Dropdown
|
||||
// =============
|
||||
|
||||
$(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();
|
||||
$("#editDropdown").submit();
|
||||
});
|
||||
@@ -21,7 +21,7 @@ $(document).ready(function() {
|
||||
// Cancel Button.
|
||||
// --------------
|
||||
|
||||
$(".btnCancel").on("click", function() {
|
||||
$(".btnCancel").on("click", async function () {
|
||||
formSubmit({ action : $sessionStorage.editDropdown });
|
||||
});
|
||||
|
||||
@@ -29,9 +29,9 @@ $(document).ready(function() {
|
||||
// Delete Button
|
||||
// -------------
|
||||
|
||||
$(".btnDelete").on("click", function() {
|
||||
$(".btnDelete").on("click", async function () {
|
||||
|
||||
if (formPost({ action : "Dropdowns.dropdownActive", dropdown_serial : $sessionStorage.dropdown_serial }) === true) {
|
||||
if (await formPost({ action : "Dropdowns.dropdownActive", dropdown_serial : $sessionStorage.dropdown_serial }) === true) {
|
||||
|
||||
$("#continue-dialog").find(".modal-title").html("Cannot Delete Dropdown").end()
|
||||
.find(".modal-body").html("This Dropdown is in use and cannot be deleted.").end()
|
||||
@@ -48,11 +48,11 @@ $(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
$("body").on("click", ".confirm-delete-dropdown .btnConfirmDialogConfirm", function() {
|
||||
$("body").on("click", ".confirm-delete-dropdown .btnConfirmDialogConfirm", async function () {
|
||||
|
||||
$.post("./", { action : "Dropdowns.deleteDropdown", dropdown_serial : $sessionStorage.dropdown_serial })
|
||||
|
||||
.done(function() {
|
||||
.done(function () {
|
||||
|
||||
$sessionStorage.action = $sessionStorage.editDropdown || "";
|
||||
$sessionStorage.toast = "Dropdown was Deleted";
|
||||
@@ -69,7 +69,8 @@ $(document).ready(function() {
|
||||
// Validate Inputs
|
||||
// ---------------
|
||||
|
||||
$("#editDropdown").submit( function(e) {
|
||||
$("#editDropdown").submit( async function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dropdowntype_serial = $("#dropdowntype_serial").val(),
|
||||
dropdown_serial = $("#dropdown_serial").val(),
|
||||
@@ -84,7 +85,7 @@ $(document).ready(function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (formPost({ action : "Dropdowns.dropdownExists", dropdowntype_serial : dropdowntype_serial, dropdown_serial : dropdown_serial, dropdown_value : dropdown_value.val() }) === true) {
|
||||
if (await formPost({ action : "Dropdowns.dropdownExists", dropdowntype_serial : dropdowntype_serial, dropdown_serial : dropdown_serial, dropdown_value : dropdown_value.val() }) === true) {
|
||||
createInputError(dropdown_value, "Value already exists");
|
||||
return false;
|
||||
}
|
||||
@@ -93,7 +94,7 @@ $(document).ready(function() {
|
||||
|
||||
$.post("./", $(this).serialize())
|
||||
|
||||
.done(function() {
|
||||
.done(function () {
|
||||
|
||||
$sessionStorage.action = $sessionStorage.editDropdown || "";
|
||||
$sessionStorage.toast = "Dropdown was Saved";
|
||||
|
||||
Reference in New Issue
Block a user