added new file upload and bug fix
This commit is contained in:
@@ -437,9 +437,10 @@ $pagination_entity_name = "Adressen";
|
||||
<div class="card-body">
|
||||
<button type="button" class="btn btn-sm btn-info" onclick="$('#new-journal').toggle(); $('#new-journal-text').focus()"><i class="fas fa-plus"></i> Neuer Journaleintrag</button>
|
||||
<div id="new-journal" class="hidden mt-2">
|
||||
<form method="post" action="<?=self::getUrl("ConstructionConsentJournal", "save")?>">
|
||||
<form method="post" action="<?=self::getUrl("ConstructionConsentJournal", "save")?>" enctype="multipart/form-data">
|
||||
<input type="hidden" name="consent_id" value="<?=$item->id?>" />
|
||||
<textarea id="new-journal-text" name="text" class="form-control mb-2" style="height:120px;" placeholder="Text hier eingeben..."></textarea>
|
||||
<input type="file" name="file" class="form-control mb-2" />
|
||||
<button class="btn btn-sm btn-primary" type="submit"><i class="fas fa-save"></i> Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -452,6 +453,19 @@ $pagination_entity_name = "Adressen";
|
||||
<td style="white-space: nowrap" class="text-monospace"><?=date("d.m.Y H:i", $j->create)?> (<?=$j->creator?>)</td>
|
||||
<td style="width: 100%">
|
||||
<?=nl2br($j->text)?>
|
||||
<?php if($j->file_id): ?>
|
||||
<a href="<?=self::getUrl("File", "download", ["id" => $j->file_id])?>" class="ml-2"><i class="far fa-fw fa-file"></i>
|
||||
<?php
|
||||
$file = new File($j->file_id);
|
||||
if ($file->fileExists()) {
|
||||
echo $file->filename;
|
||||
} else {
|
||||
echo "Datei nicht gefunden";
|
||||
}
|
||||
?>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -1161,8 +1175,8 @@ $pagination_entity_name = "Adressen";
|
||||
notify("error", "Begründung muss mindestens 3 Zeichen lang sein");
|
||||
$(this).prop("checked", false);
|
||||
switcheries.forEach(s => s.setPosition());
|
||||
ret
|
||||
if (reason != null) {
|
||||
return;
|
||||
} if (true) {
|
||||
$.post("<?php echo self::getUrl("ConstructionConsentJournal", "save")?>", {
|
||||
consent_id: <?=$item->id?>,
|
||||
text: `Genehmigung überschreiben wurde ${$(this).prop("checked") ? "aktiviert" : "deaktiviert"} | Begründung: ${reason}`
|
||||
@@ -1191,7 +1205,7 @@ $pagination_entity_name = "Adressen";
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}});
|
||||
});
|
||||
|
||||
// do the same for prioritize
|
||||
$("#prioritize").on("change", function() {
|
||||
|
||||
Reference in New Issue
Block a user