can delete Consent plan file / added empty page in Consentform.pdf
This commit is contained in:
@@ -269,6 +269,8 @@
|
||||
<p>Energie Steiermark Breitband GmbH</p>
|
||||
</div>
|
||||
|
||||
<div class="page"> </div>
|
||||
|
||||
<div class="page">
|
||||
|
||||
<p class="text-right">
|
||||
@@ -410,7 +412,7 @@
|
||||
<div class="borderpoint">
|
||||
<h3>Übersichtsplan / Planskizze</h3>
|
||||
|
||||
<?php if($consent->file): ?>
|
||||
<?php if($consent->file && $consent->file->file_id && $consent->file->file->fileExists()): ?>
|
||||
<img src="<?=$consent->file->file->asDataUrl()?>" style="max-width: 640px; max-height: 640px; border: 1px solid #000" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -201,18 +201,10 @@
|
||||
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">Plan Vorschau</h5>
|
||||
<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) ? "src=".$item->file->file->asDataUrl()."" : "" ?> />
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-outline-danger hidden" id="delete-rimo-plan" onclick="deleteRimoPlan()">
|
||||
<i class="far fa-fw fa-trash-alt"></i> Plan löschen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img id="plan_preview" style="max-width: 1200px;" <?=($item->file && $item->file->file && $item->file->file->fileExists()) ? "src=".$item->file->file->asDataUrl()."" : "" ?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -369,6 +361,7 @@
|
||||
var [file] = $("#consent_plan_image").prop("files");
|
||||
if(file) {
|
||||
$("#plan_preview").attr("src", URL.createObjectURL(file));
|
||||
$("#delete-rimo-plan").show();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -377,11 +370,19 @@
|
||||
$("#adb_strasse_id").val("").change();
|
||||
});
|
||||
|
||||
function deleteRimoPlan() {
|
||||
$('#plan_adb_hausnummer_id').val("");
|
||||
$("#submit_plan_file_id").val();
|
||||
function deletePlan() {
|
||||
$('#plan_adb_hausnummer_id').val("").change();
|
||||
$("#submit_plan_file_id").val("");
|
||||
$("#plan_preview").attr("src", "");
|
||||
$("#delete-rimo-plan").hide();
|
||||
$("#consent_plan_image").val("");
|
||||
|
||||
<?php if(isset($item) && $item->id): ?>
|
||||
$.post("<?=self::getUrl("ConstructionConsent", "api")?>", {
|
||||
do: "deleteRimoPlan",
|
||||
id: <?=$item->id?>
|
||||
});
|
||||
<?php endif; ?>
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user