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 @@ getCat()->name?> Edit View applicants (getApps())?>) -
- - -
+ +
+ + closingDate)) > date('y-m-d')) { ?> + + + + +
+ diff --git a/todo b/todo index 342b61f..88e6bf7 100644 --- a/todo +++ b/todo @@ -17,7 +17,7 @@ Assignment 2: - User accounts made in admin portal - Client user accounts - restricted admin panel @done - - add and archive jobs + - add and archive jobs @done - see who has applied for jobs @done - Client can only see their jobs @done - Homepage has 10 jobs that are about to reach closing date @done