added contact edit button

This commit is contained in:
Luca Haid
2025-03-25 10:38:20 +01:00
parent 7be3446383
commit 321726718f
11 changed files with 157 additions and 50 deletions
+7 -3
View File
@@ -8,8 +8,12 @@
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a></li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("ConstructionConsentProject")?>">Zustimmungserklärungsprojekte</a></li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("ConstructionConsent")?>">Zustimmungserklärungen</a></li>
<?php if(isset($item)): ?>
<li class="breadcrumb-item"><a href="<?=self::getUrl("ConstructionConsent", "View", ["id" => $item->id])?>"><?=htmlentities($item->name)?></a></li>
<li class="breadcrumb-item active">bearbeiten</li>
<?php endif; ?>
<li class="breadcrumb-item active">
<?= ($Action == "add") ? "Neue " : "" ?>Zustimmungserklärung <?= ($Action == "edit") ? "bearbeiten " : "" ?>
</li>
</ol>
</div>
<h4 class="page-title">Zustimmungserklärung</h4>
@@ -37,7 +41,7 @@
<label class="col-lg-2 col-form-label" for="constructionconsentproject_id">Projekt *</label>
<div class="col-lg-10">
<select class="form-control" name="constructionconsentproject_id" id="constructionconsentproject_id">
<?php foreach(ConstructionConsentProject::getAll() as $project): ?>
<?php foreach(ConstructionConsentProject::search(['id' => $allowed_projects]) as $project): ?>
<option value="<?=$project->id?>" <?=(isset($project_id) && $project_id == $project->id || isset($item) && $item->constructionconsentproject_id == $project->id) ? "selected='selected'" : ""?>><?=$project->name?></option>
<?php endforeach; ?>
</select>
@@ -204,7 +208,7 @@
<h5 class="card-header">Plan Vorschau <button type='button' id="delete-rimo-plan" class='ml-2 btn btn-sm btn-outline-danger pointer <?=($item->file && $item->file->file && $item->file->file->fileExists()) ? "" : "hidden" ?>' onclick='deletePlan()'><i class='fas fa-fw fa-trash'></i> Plan löschen</button></h5>
<div class="card-body" id="rimo-plan-container">
<input type="hidden" name="submit_plan_file_id" id="submit_plan_file_id" value="" />
<img id="plan_preview" style="max-width: 1200px;" <?=($item->file && $item->file->file && $item->file->file->fileExists()) ? "src=".$item->file->file->asDataUrl()."" : "" ?> />
<img id="plan_preview" style="max-width: 1200px;" <?=(isset($item) && $item->file && $item->file->file && $item->file->file->fileExists()) ? "src=".$item->file->file->asDataUrl()."" : "" ?> />
</div>
</div>