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

View File

@@ -257,6 +257,38 @@ $siteTitle = "Benutzer";
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h4 class="card-title mb-3">Zustimmungserklärungen</h4>
<div class="form-group" id="constructionconsent-projects-container">
<label for="constructionconsent_projects">Zustimmungserklärungsprojekte:</label>
<?php
$constructionConsent_projects = [];
if($user->id) {
$constructionConsent_projects = json_decode((new WorkerFlag($user->id, "constructionConsent_projects"))->value());
if(!$constructionConsent_projects) {
$constructionConsent_projects = [];
}
}
?>
<select name="constructionconsent_projects[]" id="constructionconsent_projects"
class="form-control" multiple="multiple">
<?php foreach(ConstructionConsentProject::getAll() as $project): ?>
<option value="<?=$project->id?>" <?=(in_array($project->id, $constructionConsent_projects)) ? "selected='selected'" : ""?>><?=$project->name?></option>
<?php endforeach; ?>
</select>
<small>Benutzer kann nur Zustimmungserklärungen in diesen Projekten sehen</small>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
@@ -481,6 +513,11 @@ $siteTitle = "Benutzer";
placeholder: "",
closeOnSelect: false
});
$("#constructionconsent_projects").select2({
allowClear: true,
placeholder: "",
closeOnSelect: false
});
<?php if(!$user || (!$user->is("preorderfront") && !$user->is("preorderaddressreporting")) ): ?>
//$("#preorder-network-container").hide();