added new file upload and bug fix
This commit is contained in:
@@ -164,6 +164,14 @@ $pagination_entity_name = "Zustimmungserklärungen";
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_deferred">Aufgeschoben</label>
|
||||
<select name="filter[deferred]" id="filter_deferred" class="form-control">
|
||||
<option value="">Alle</option>
|
||||
<option value="!NULL" <?=(array_key_exists("deferred", $filter) && $filter["deferred"] == "!NULL") ? "selected='selected'" : ""?>>Ja</option>
|
||||
<option value="NULL" <?=(array_key_exists("deferred", $filter) && $filter["deferred"] == "NULL") ? "selected='selected'" : ""?>>Nein</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -132,6 +132,13 @@ $pagination_entity_name = "Adressen";
|
||||
<input type="checkbox" id="prioritize" class="switchery" data-size="small" data-color="#25b343" data-toggle-param="prioritize" <?=($item->prioritize) ? "checked='checked'" : ""?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Aufschieben</th>
|
||||
<td>
|
||||
<input type="checkbox" id="deferred" class="switchery" data-size="small" data-color="#25b343" data-toggle-param="deferred" <?=($item->deferred) ? "checked='checked'" : ""?> />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if($item->object_type == "building"): ?>
|
||||
<tr>
|
||||
<td colspan="2"><h4>Metadaten</h4></td>
|
||||
@@ -1205,7 +1212,45 @@ $pagination_entity_name = "Adressen";
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#deferred").on("change", function() {
|
||||
const reason = prompt("Bitte geben Sie einen Grund für das Zurückstellen der Genehmigung ein:");
|
||||
if (reason != null && reason.length < 3) {
|
||||
notify("error", "Begründung muss mindestens 3 Zeichen lang sein");
|
||||
$(this).prop("checked", false);
|
||||
switcheries.forEach(s => s.setPosition());
|
||||
return;
|
||||
} if (true) {
|
||||
$.post("<?php echo self::getUrl("ConstructionConsentJournal", "save")?>", {
|
||||
consent_id: <?=$item->id?>,
|
||||
text: `Genehmigung zurückgestellt wurde ${$(this).prop("checked") ? "aktiviert" : "deaktiviert"} | Begründung: ${reason}`
|
||||
}, function (success) {
|
||||
if (success.status != "OK") {
|
||||
notify("error", "Status konnte nicht gespeichert werden");
|
||||
} else {
|
||||
notify("success", "Status erfolgreich gespeichert");
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
$.get("<?php echo self::getUrl("ConstructionConsent", "defer")?>", {
|
||||
consent_id: <?=$item->id?>,
|
||||
checked: $(this).prop("checked") ? 1 : 0
|
||||
}, function (success) {
|
||||
if (success.status != "OK") {
|
||||
notify("error", "Status konnte nicht gespeichert werden");
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 150);
|
||||
} else {
|
||||
notify("success", "Status erfolgreich gespeichert");
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 150);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
})
|
||||
|
||||
// do the same for prioritize
|
||||
$("#prioritize").on("change", function() {
|
||||
|
||||
Reference in New Issue
Block a user