diff --git a/app/Controllers/Configurationctrl.php b/app/Controllers/Configurationctrl.php index 1ff5b1fe..2ca8e311 100755 --- a/app/Controllers/Configurationctrl.php +++ b/app/Controllers/Configurationctrl.php @@ -43,6 +43,7 @@ class Configurationctrl extends BaseController $data['userRecords'] = $this->configmodel->Configlisting(); + $this->global['pageTitle'] = 'Config Listing'; $this->loadViews("configlisting", $this->global, $data, NULL); diff --git a/app/Views/configlisting.php b/app/Views/configlisting.php index f7ef082b..21bbde54 100755 --- a/app/Views/configlisting.php +++ b/app/Views/configlisting.php @@ -193,9 +193,7 @@    @@ -347,55 +345,10 @@ }); - // function confirmDeleteConfig(event) { - // let result = confirm("Do You want to delete this configuration ?"); - // if (result) { return; } else { event.preventDefault(); } - // } - function confirmDeleteConfig(event) { - event.preventDefault(); // Prevent default link action - - let key_id = $(event.currentTarget).data('key'); - let code_value = $(event.currentTarget).data('code'); - - if (code_value == 'C023') { - $.ajax({ - type: 'POST', - url: "", - data: { key_id: key_id }, - dataType: 'json', - success: function(data) { - - let content = "Do you want to delete this configuration?"; - - if (data.length > 0) { - content += "\n\nCreated PONO's are - "; - - data.forEach(function(item) { - content += "\n- " + item.PONO; - }); - } - - let result = confirm(content); - - if (result) { - window.location.href = event.currentTarget.href; // Proceed with deletion - } - }, - error: function(xhr, status, error) { - console.log("Error occurred: ", error); - }, - complete: function() { - console.log('AJAX call completed.'); - } - }); - } else { - let result = confirm("Do you want to delete this configuration?"); - if (result) { - window.location.href = event.currentTarget.href; // Proceed with deletion - } - } - } + let result = confirm("Do You want to delete this configuration ?"); + if (result) { return; } else { event.preventDefault(); } + } function confirmReActivateConfig(event) { let result = confirm("Do You want to Re activate deleted configuration ?");