diff options
Added skeleton of edit offer and implemented edit and delete buttons in dashboard offers
1 files changed, 16 insertions, 1 deletions
| -rw-r--r-- | src/views/dashboard.php | 17 |
diff --git a/src/views/dashboard.php b/src/views/dashboard.php index 86c393a..b1b648c 100644 --- a/src/views/dashboard.php +++ b/src/views/dashboard.php @@ -1 +1,16 @@ -<p>Dashboard works!</p> +<?php + foreach($jobs as $job) { + echo "{$job->id} {$job->title} + <form method=\"post\"> + <input type=\"hidden\" name=\"_method\" value=\"put\"> + <input type=\"hidden\" name=\"jobId\" value=\"{$job->id}\"> + <input type=\"submit\" value=\"Edit\"> + </form> + <form method=\"post\"> + <input type=\"hidden\" name=\"_method\" value=\"delete\"> + <input type=\"hidden\" name=\"jobId\" value=\"{$job->id}\"> + <input type=\"submit\" value=\"Delete\"> + </form> + <br>"; + } +?> |
