diff --git a/jobs/controllers/Portal.php b/jobs/controllers/Portal.php index 9a858ee..8572938 100644 --- a/jobs/controllers/Portal.php +++ b/jobs/controllers/Portal.php @@ -38,13 +38,18 @@ class Portal { } public function homeSubmit() { - if (isset($_POST['job_id'])) { - $this->jobsTable->delete("id", $_POST['job_id']); - return $this->home(); + if ($_POST['submit'] == "List") { + //TODO: Direct to edit job date } - if (isset($_POST['cat_id'])) { - $this->catsTable->delete("id", $_POST['cat_id']); - return $this->categories(); + else { //TODO: Change to archive instead of delete + if (isset($_POST['job_id'])) { + $this->jobsTable->delete("id", $_POST['job_id']); + return $this->home(); + } + if (isset($_POST['cat_id'])) { + $this->catsTable->delete("id", $_POST['cat_id']); + return $this->categories(); + } } } diff --git a/templates/job_table.html.php b/templates/job_table.html.php index e2b5fe5..2559934 100644 --- a/templates/job_table.html.php +++ b/templates/job_table.html.php @@ -27,10 +27,17 @@