added new file upload and bug fix
This commit is contained in:
@@ -65,7 +65,7 @@ class ConstructionConsentJournal extends mfBaseModel {
|
||||
$model = new ConstructionConsentJournal();
|
||||
|
||||
$table_fields = [
|
||||
"constructionconsent_id", "text",
|
||||
"constructionconsent_id", "text", "file_id",
|
||||
"create_by","edit_by","create","edit"
|
||||
];
|
||||
|
||||
|
||||
@@ -44,8 +44,19 @@ class ConstructionConsentJournalController extends mfBaseController {
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
$uploaded = mfUpload::handleFormUpload("file", false, "/ConstructionConsentJournal");
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
die();
|
||||
$this->layout()->setFlash("Fehler beim speichern!", "error");
|
||||
$this->redirect("ConstructionConsent", "View", ["id" => $consent->id]);
|
||||
}
|
||||
|
||||
|
||||
$journal = ConstructionConsentJournal::create([
|
||||
"constructionconsent_id" => $consent->id,
|
||||
"file_id" => $uploaded->id,
|
||||
"text" => $text
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user