fixed apply and save
This commit is contained in:
parent
fa203f16cc
commit
f369120fcc
|
|
@ -62,14 +62,14 @@ class DatabaseTable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save($record) {
|
public function save($record) {
|
||||||
if (\empty($record[$pk])) {
|
if (empty($record[$this->pk])) {
|
||||||
\unset($record[$pk]);
|
unset($record[$this->pk]);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
insert($record);
|
$this->insert($record);
|
||||||
}
|
}
|
||||||
catch (\Exception $e) {
|
catch (\Exception $e) {
|
||||||
update($record);
|
$this->update($record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<section class="right">
|
<section class="right">
|
||||||
<h2>Apply for <?=$job->title?></h2>
|
<h2>Apply for <?=$job->title?></h2>
|
||||||
<form action="apply.php" method="POST" enctype="multipart/form-data">
|
<form action="/jobs/apply" method="POST" enctype="multipart/form-data">
|
||||||
<label>Your name</label>
|
<label>Your name</label>
|
||||||
<input type="text" name="name" />
|
<input type="text" name="name" />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue