WIP ConstructionConsent 2025-01-13
This commit is contained in:
343
Layout/default/ConstructionConsent/Consentform.pdf.php
Normal file
343
Layout/default/ConstructionConsent/Consentform.pdf.php
Normal file
@@ -0,0 +1,343 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $ressourcePathPrefix
|
||||
* @var array $owners
|
||||
* @var object $consent
|
||||
*/
|
||||
?>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<title>Zustimmungserklärung</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin-top: 0;
|
||||
margin-left: 36px;
|
||||
margin-right: 36px;
|
||||
/*padding-top: 20pt;*/
|
||||
font-family: "ITC Officina Sans Std", "OfficinaSans", sans-serif;
|
||||
font-size: 11pt;
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
.no-ligature {
|
||||
font-variant-ligatures: none;
|
||||
}
|
||||
|
||||
.no-word-break {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.page {
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.consent-table {
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
border: 1px solid #000;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.consent-table th:last-child {
|
||||
width: 50%;
|
||||
max-width: 40%;
|
||||
}
|
||||
|
||||
.consent-table th,
|
||||
.consent-table td {
|
||||
text-align: left;
|
||||
border: 1px solid #000;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
letter-spacing: 2px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.logo-top {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.options-table tr {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.options-table td {
|
||||
line-height: 18px;
|
||||
vertical-align: top;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.options-table td.bullet {
|
||||
vertical-align: top;
|
||||
padding-left: 0;
|
||||
padding-right: 8px;
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.block-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.input-label {
|
||||
font-size: 9px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.input-text {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-bottom: 1px solid #000;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.signature-line {
|
||||
font-size: 9px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 4px;
|
||||
padding-top: 4px;
|
||||
border-top: 1px solid #000;
|
||||
}
|
||||
|
||||
.float-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.borderpoint {
|
||||
padding-bottom: 128px;
|
||||
}
|
||||
|
||||
.mt-0 {
|
||||
margin-top: 0;
|
||||
}
|
||||
.mt-1 {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.mt-2 {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.mt-3 {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.mt-4 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.mb-0 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.mb-1 {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.mb-2 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.mb-3 {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.mb-4 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.pl-0 {
|
||||
padding-left: 0;
|
||||
}
|
||||
.pl-1 {
|
||||
padding-left: 4px;
|
||||
}
|
||||
.pl-2 {
|
||||
padding-left: 8px;
|
||||
}
|
||||
.pl-3 {
|
||||
padding-left: 12px;
|
||||
}
|
||||
.pl-4 {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php foreach($owners as $owner): ?>
|
||||
<div class="page">
|
||||
|
||||
<p class="text-right">
|
||||
<img class="logo-top" src="<?=$ressourcePathPrefix?>/assets/images/estmk-bb-logo-square.png" />
|
||||
</p>
|
||||
|
||||
<h1 class="text-center mb-0"><em>Zustimmungserklärung</em></h1>
|
||||
<p class="text-center mb-4 mt-0">
|
||||
gemäß Telekommunikationsgesetz (TKG 2021, 7. Abschnitt, §52)
|
||||
</p>
|
||||
|
||||
|
||||
<p>Der <strong>Energie Steiermark Breitband GmbH, 8010 Graz, Leonhardgürtel 10,</strong> FN 576705x, in der Folge kurz BB genannt, wird von</p>
|
||||
<div class="input-label mb-0">
|
||||
Name, Anschrift
|
||||
</div>
|
||||
<div class="input-text mb-2">
|
||||
<strong><?=$owner->name?>, <?=$owner->street?>, <?=$owner->zip?> <?=$owner->city?></strong>
|
||||
</div>
|
||||
<div class="input-label mb-0">
|
||||
Objektanschrift
|
||||
</div>
|
||||
<div class="input-text">
|
||||
<strong><?=$owner->consent->adb_strasse->name?>, <?=$owner->consent->adb_strasse->gemeinde->name?></strong>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
als Grundeigentümer(in), in Folge kurz GE genannt, die ausdrückliche Zustimmung zur Errichtung, für den Betrieb, zur Erhaltung und Wartung,
|
||||
sowie den Umbau und der Verstärkung der gegenständlichen Telekommunikationsanlage auf dem(n) unten angeführten Grundstück(en) eingeräumt.
|
||||
Die Rechte werden auf Bestandsdauer der Anlage eingeräumt.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Bereitsteller eines öffentlichen Kommunikationsnetzes sind berechtigt, Leitungsrechte an privaten Liegenschaften in Anspruch zu nehmen,
|
||||
sofern öffentliche Rücksichten nicht im Wege stehen und wenn
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>die widmungsgemäße Verwendung des Grundstückes durch die Nutzung nicht oder nur unwesentlich dauernd eingeschränkt wird und wenn</li>
|
||||
<li>eine Mitbenutzung von Anlagen, Leitungen oder sonstigen Einrichtungen nach § 60 – 64 nicht möglich oder nicht tunlich ist.</li>
|
||||
</ol>
|
||||
|
||||
<p>Die BB beabsichtigt für das Projekt <?=$consent->name?> in Ausübung dieses Rechtes auf dem(n) Grundstück(en)</p>
|
||||
|
||||
<table class="consent-table">
|
||||
<tr>
|
||||
<th>Gst. Nr.</th>
|
||||
<th>KG</th>
|
||||
<th>EZ</th>
|
||||
<th>LWL-Leerrohre und/oder LWL-Kabel (Künette, Inhouse etc.)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=$consent->gstnr?></td>
|
||||
<td><?=$consent->kg?></td>
|
||||
<td><?=$consent->ez?></td>
|
||||
<td>ca. <?=$consent->usage_length?> lfm (exkl. Beigest. LWL-Wohnungsverkabelung)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>und dem(n) darauf befindlichen Gebäude(n), in Folge kurz Liegenschaft genannt, folgende Telekommunikationsanlage(n) zu errichten:</p>
|
||||
|
||||
<table class="options-table">
|
||||
<tr>
|
||||
<td class="bullet"><?=($consent->usage_pipe_on_plot) ? "☒" : "☐"?></td>
|
||||
<td>Verlegung von Rohren und Lichtwellenleitern am Grundstück</td>
|
||||
</tr><tr>
|
||||
<td class="bullet"><?=($consent->usage_pipe_in_building) ? "☒" : "☐"?></td>
|
||||
<td>Verlegung von Rohren und Lichtwellenleitern in den darauf befindlichen Gebäuden</td>
|
||||
</tr><tr>
|
||||
<td class="bullet"><?=($consent->usage_manhole) ? "☒" : "☐"?></td>
|
||||
<td>Errichtung eines Schachtes/einer Kabelmontagegrube und/oder eines LWL-Verteilschrankes/einer LWL-Abschlussbox.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p>
|
||||
Allgemein umfassen Telekommunikationslinien einen Flächenstreifen in einer Breite von 0,5 m. Weitere Projektdetails zur Zustimmungserklärung
|
||||
sind im Übersichtsplan/Planskizze abgebildet.
|
||||
</p>
|
||||
|
||||
<table class="options-table">
|
||||
<tr>
|
||||
<td class="bullet"><?=($consent->usage_owner) ? "☒" : "☐"?></td>
|
||||
<td>Die Nutzung der Liegenschaft seitens BB dient der Eigenversorgung der GE und/oder dessen Nutzer(in) und wird dieser entgeltlos zugestimmt.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
Der GE gibt hiermit die Zustimmung für die Errichtung der angeführten Telekommunikationsanlage(n) auf den vertragsgegenständlichen in seinem
|
||||
Eigentum befindlichen Grundstücken und ermächtigt die Energie Steiermark Breitband GmbH, bei der zuständigen Behörde in eigenem Namen, um die
|
||||
notwendigen öffentlich-rechtlichen Genehmigungen (Forstrecht und/oder Wasserrecht) anzusuchen. Die Grundinanspruchnahme erfolgt gemäß „TKG 2021“.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="height: 28px;"></div>
|
||||
|
||||
<div class="page">
|
||||
<p>
|
||||
Der GE gestattet und ermöglicht der BB die Errichtung, den Betrieb, die Erhaltung, die Wartung, den Umbau und die Verstärkung der
|
||||
Telekommunikationsanlagen auf der Liegenschaft. Ebenso gestattet und ermöglicht der GE der BB, sowie allen von ihr beauftragten oder namhaft
|
||||
gemachten Dritten, zur Durchführung erforderlicher oder zweckmäßiger Erhaltungs- und Wartungsarbeiten den jederzeitigen und ungehinderten Zugang
|
||||
zur Liegenschaft und den Telekommunikationsanlagen. Für die Dauer dieser Erhaltungs- und Wartungsarbeiten ist die BB auch berechtigt, die
|
||||
Liegenschaft zu begehen und wenn notwendig zu befahren. Die BB ist berechtigt die eingeräumten Rechte einzeln oder gesamt an Dritte zu übertragen.
|
||||
</p>
|
||||
<p>
|
||||
Der GE sichert der BB zu, keine baulichen Maßnahmen, die im Abstand von unter einem Meter von der Telekommunikationsanlage erforderlich sind bzw. den
|
||||
Betrieb der Telekommunikationsanlagen stören könnten, zu ergreifen. Sollte eine derartige bauliche Maßnahme unbedingt erforderlich sein, wird der GE
|
||||
die BB von diesen baulichen Maßnahmen rechtzeitig vorab schriftlich verständigen und binnen 6 Wochen eine Einigung mit der BB über die Ausführung
|
||||
dieser baulichen Maßnahme herbeiführen.
|
||||
</p>
|
||||
<p>
|
||||
Die BB verpflichtet sich, die Liegenschaft unter tunlichster Schonung in Anspruch zu nehmen. Nach Abschluss der Arbeiten wird der ursprüngliche Zustand
|
||||
wieder hergestellt, ggf. entstandene Beschädigungen an Gebäuden und/oder Flurschäden im Zuge der Errichtung der Telekommunikations­anlage(n) werden
|
||||
wieder ordnungsgemäß instandgesetzt oder gesondert vergütet.
|
||||
</p>
|
||||
<p>
|
||||
Die Telekommunikationsanlagen müssen verlegt oder - soweit sie nicht das Grundstück selbst versorgen und eine Verlegung nicht ausreicht - entfernt
|
||||
werden, wenn sie einer veränderten Nutzung der Liegenschaft entgegenstehen und ihr Verbleiben an der bisherigen Stelle nicht mehr zumutbar ist. Die
|
||||
Kosten für die Verlegung oder Entfernung trägt die BB. Im Falle einer dauernden Außerbetriebnahme der errichteten Telekommunikationsanlagen verbleiben
|
||||
die Leitungen im Boden. Diese werden nur dann auf Kosten der BB entfernt, wenn diese der widmungsgemäßen Nutzung hinderlich sind.
|
||||
</p>
|
||||
<p>
|
||||
Die Telekommunikationsanlagen verbleiben im Eigentum der BB und gehen nicht in das Eigentum des GE über.
|
||||
</p>
|
||||
<p>
|
||||
Im Falle des Eigentümerwechsels hat der GE sämtliche Verpflichtungen aus dieser Vereinbarung an den Rechtsnachfolger zu übertragen.
|
||||
</p>
|
||||
<p>
|
||||
Die mit der Ausfertigung der Vereinbarung verbundenen Kosten und Abgaben, mit Ausnahme der rechtsfreundlichen Beratung des GE, trägt die BB.
|
||||
</p>
|
||||
<p>
|
||||
Die Information zur Datenschutzerklärung für das Unternehmen finden Sie unter
|
||||
<span class="no-word-break">https://www.e-breitband.at/downloads-data/pdf.aspx?pdf=AGB_Breitband_80g_032022.pdf</span> und <span class="no-word-break">https://www.e-breitband.at/Downloads/Default.aspx</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="height: 28px;"></div>
|
||||
|
||||
<div class="borderpoint">
|
||||
<h3>Übersichtsplan / Planskizze</h3>
|
||||
|
||||
<img src="<?=$ressourcePathPrefix?>/borderpoint-cc.png" style="width: 600px; border: 1px solid #000" />
|
||||
</div>
|
||||
|
||||
<div class="signature-line mt-4">
|
||||
<div class="float-left" style="width: 25%;">Ort, Datum</div>
|
||||
<div class="float-right" style="width: 75%;">
|
||||
Unterschrift mit Geburtsdatum bzw. firmenmäßige Zeichnung des/r Liegenschaftseigentümer(s)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -105,7 +105,7 @@
|
||||
<h4>Nutzung</h4>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="usage_length">Länge auf Grundstück</label>
|
||||
<label class="col-lg-2 col-form-label" for="usage_length">Länge auf Grundstück (in m)</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="usage_length" id="usage_length" value="<?=$item->usage_length?>" />
|
||||
</div>
|
||||
|
||||
@@ -118,7 +118,7 @@ $pagination_entity_name = "Zustimmungserklärungen";
|
||||
<?=$item->adb_hausnummer->strasse->gemeinde->name?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=$item->adb_hausnummer->grund_nr?></td>
|
||||
<td><?=$item->gstnr?></td>
|
||||
<td><?=$item->ez?></td>
|
||||
<td><?=$item->owner_name?></td>
|
||||
<td>
|
||||
|
||||
@@ -25,8 +25,15 @@ $pagination_entity_name = "Adressen";
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a href="<?=self::getUrl("ConstructionConsent")?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
|
||||
<a href="<?=self::getUrl("ConstructionConsent","edit", ['id' => $item->id])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Zustimmungserklärung bearbeiten</a>
|
||||
<a href="<?=self::getUrl("ConstructionConsent")?>" class="btn btn-secondary mr-1"><i class="fas fa-fw fa-list"></i> Zurück zur Übersicht</a>
|
||||
<a href="<?=self::getUrl("ConstructionConsent","edit", ['id' => $item->id])?>" class="btn btn-outline-success"><i class="fas fa-fw fa-edit"></i> Zustimmungserklärung bearbeiten</a>
|
||||
|
||||
|
||||
<?php if(!is_array($item->owners) || !count($item->owners)):?>
|
||||
<a href="#" class="float-right btn btn-outline-primary disabled mr-1"><i class="fas fa-fw fa-envelope"></i> Zustimmungserklärungsformular an alle Besitzer senden</a>
|
||||
<?php else: ?>
|
||||
<a href="<?=self::getUrl("ConstructionConsent", "Send", ["id" => $item->id])?>" class="float-right btn btn-primary mr-1"><i class="fas fa-fw fa-envelope"></i> Zustimmungserklärungsformular an alle Besitzer senden</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,7 +56,7 @@ $pagination_entity_name = "Adressen";
|
||||
<td><?=$item->adb_strasse->gemeinde->name?>, <?=$item->adb_strasse->name?></td>
|
||||
</tr><tr>
|
||||
<th>Geplante Länge</th>
|
||||
<td><?=$item->usage_length?></td>
|
||||
<td><?=$item->usage_length?> lfm</td>
|
||||
</tr><tr>
|
||||
<th>Geplante Nutzung</th>
|
||||
<td>
|
||||
@@ -118,7 +125,7 @@ $pagination_entity_name = "Adressen";
|
||||
<small><a data-toggle="modal" data-target="#newOwnerModal" href="#"><i class="fas fa-plus"></i> Neuen Besitzer hinzufügen</a></small>
|
||||
</h3>
|
||||
|
||||
<button class="btn btn-sm btn-outline-primary mb-2"><i class="fas fa-download fa-fw"></i> Grundbuch jetzt abfragen</button>
|
||||
<button class="btn btn-sm btn-outline-primary mb-2"><i class="fas fa-down fa-fw"></i> Grundbuch jetzt abfragen</button>
|
||||
|
||||
<?php if(!is_array($item->owners) || !count($item->owners)): ?>
|
||||
<i>Noch keine Besitzer bekannt</i>
|
||||
@@ -151,9 +158,10 @@ $pagination_entity_name = "Adressen";
|
||||
<td class="text-monospace"><?=__($item->status, "consent")?></td>
|
||||
</tr><tr>
|
||||
<th>Anfrage Resultat</th>
|
||||
<td class="text-monospace"><?=__($item->result, "consent")?></td>
|
||||
<td class="text-monospace"><?=($item->result) ? __($item->result, "consent") : ""?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="<?=self::getUrl("ConstructionConsent", "Download", ["owner_id" => $owner->id])?>"><i class="fas fa-fw fa-file-pdf"></i> Zustimmungserklärungsformular herunterladen</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@@ -169,6 +177,7 @@ $pagination_entity_name = "Adressen";
|
||||
<div class="modal fade" id="newOwnerModal" aria-hidden="true" aria-labelledby="#newOwnerModelLabel" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="post" action="<?=self::getUrl("ConstructionConsentOwner", "save")?>">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="newOwnerModelLabel">Neuen Besitzer hinzufügen</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
@@ -176,7 +185,7 @@ $pagination_entity_name = "Adressen";
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="post" action="<?=self::getUrl("ConstructionConsentOwner", "save")?>">
|
||||
|
||||
<input type="hidden" name="constructionconsent_id" value="<?=$item->id?>" />
|
||||
<h4>Name & Anschrift</h4>
|
||||
|
||||
@@ -225,13 +234,13 @@ $pagination_entity_name = "Adressen";
|
||||
<label for="email" class="col-form-label">Email:</label>
|
||||
<input type="text" class="form-control" name="email" id="email" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Abbrechen</button>
|
||||
<button type="button" class="btn btn-primary">Speichern</button>
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class ConstructionConsent extends mfBaseModel {
|
||||
protected $forcestr = ["name", "ez", "kg", "gst", "gstnr", "usage_length"];
|
||||
private $project;
|
||||
private $termnination;
|
||||
private $adb_hausnummer;
|
||||
@@ -9,6 +10,44 @@ class ConstructionConsent extends mfBaseModel {
|
||||
private $creator;
|
||||
private $editor;
|
||||
|
||||
private $footer_text = "Energie Steiermark Breitband GmbH, A-8010 Graz, Leonhardgürtel 10, Telefon +43 (0)316 9000-0\nSitz Graz, FN 576705x, Landesgericht für ZRS Graz, ATU 77949678, breitband@e-steiermark.com, www.e-steiermark.com";
|
||||
private $footer_font = "ITC Officina Sans Std";
|
||||
private $footer_size = "8";
|
||||
|
||||
|
||||
public function createConsentFormPdf(ConstructionConsentOwner $owner = null) : ?string {
|
||||
if($owner) {
|
||||
$owners = [$owner];
|
||||
} else {
|
||||
if(!is_array($this->getProperty("owners")) || !count($this->getProperty("owners"))) {
|
||||
return null;
|
||||
}
|
||||
$owners = $this->owners;
|
||||
}
|
||||
|
||||
$pdf_vars = [
|
||||
"consent" => $this,
|
||||
"owners" => $owners
|
||||
];
|
||||
|
||||
$footer_text = $this->footer_text;
|
||||
$footer_font = $this->footer_font;
|
||||
$footer_size = $this->footer_size;
|
||||
|
||||
$pdf = new PdfForm("ConstructionConsent/Consentform.pdf", $pdf_vars);
|
||||
|
||||
$wkOpts = "--footer-center '$footer_text' --footer-font-name '$footer_font' --footer-font-size '$footer_size'";
|
||||
$filename = $pdf->render($wkOpts);
|
||||
|
||||
if(!file_exists($filename) || !is_file($filename)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $filename;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
|
||||
@@ -130,6 +130,49 @@ class ConstructionConsentController extends mfBaseController {
|
||||
$this->addAction();
|
||||
}
|
||||
|
||||
protected function download() {
|
||||
//var_dump($r->get());exit;
|
||||
$owner_id = $this->request->owner_id;
|
||||
if (!is_numeric($owner_id) || $owner_id < 1) {
|
||||
$this->layout()->setFlash("Besitzer nicht gefunden", "error");
|
||||
$this->redirect("ConstructionConsent");
|
||||
}
|
||||
|
||||
$owner = new ConstructionConsentOwner($owner_id);
|
||||
if (!$owner->id) {
|
||||
$this->layout()->setFlash("Besitzer nicht gefunden", "error");
|
||||
$this->redirect("ConstructionConsent");
|
||||
}
|
||||
|
||||
$cc = $owner->consent;
|
||||
if(!$cc) {
|
||||
$this->layout()->setFlash("Zustimmungserklärung nicht gefunden.", "error");
|
||||
$this->redirect("ConstructionConsent");
|
||||
}
|
||||
|
||||
$this->layout()->setTemplate("ConstructionConsent/Consentform.pdf");
|
||||
$this->layout()->set("ressourcePathPrefix", MFFANCYBASEURL);
|
||||
$this->layout()->set("owners", [$owner]);
|
||||
$this->layout()->set("consent", $cc);
|
||||
//return true;
|
||||
|
||||
$filename = $cc->createConsentFormPdf();
|
||||
if(!$filename) {
|
||||
$this->layout()->setFlash("Beim Erstellen des PDFs ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.", "error");
|
||||
$this->redirect("ConstructionConsent", "View", ["id" => $cc->id]);
|
||||
}
|
||||
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-disposition: attachment; filename="Zustimmungserklärung-'.$cc->id.'-'.$owner_id.'.pdf"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Content-Type: ' . mime_content_type($filename));
|
||||
header("Content-Length: " . filesize($filename));
|
||||
|
||||
readfile($filename);
|
||||
exit;
|
||||
}
|
||||
|
||||
protected function saveAction() {
|
||||
$r = $this->request;
|
||||
//var_dump($r->get());exit;
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
<?php
|
||||
|
||||
class ConstructionConsentOwner extends mfBaseModel {
|
||||
private $consent;
|
||||
|
||||
public function getProperty($name) {
|
||||
if($this->$name == null) {
|
||||
|
||||
if($name == "consent") {
|
||||
$consent = new ConstructionConsent($this->constructionconsent_id);
|
||||
if($consent->id) {
|
||||
$this->consent = $consent;
|
||||
}
|
||||
return $consent;
|
||||
}
|
||||
|
||||
$classname = ucfirst($name);
|
||||
$idfield = $name."_id";
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
class ConstructionConsentOwnerController extends mfBaseController
|
||||
{
|
||||
|
||||
protected function init(): void
|
||||
{
|
||||
$this->needlogin = true;
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$this->me = $me;
|
||||
$this->layout()->set("me", $me);
|
||||
|
||||
if (!$me->is(["Admin"])) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
}
|
||||
|
||||
protected function saveAction()
|
||||
{
|
||||
$r = $this->request;
|
||||
//var_dump($r->get());exit;
|
||||
$id = $r->id;
|
||||
if (is_numeric($id) && $id > 0) {
|
||||
$mode = "edit";
|
||||
$item = new ConstructionConsentOwner($id);
|
||||
if (!$item->id) {
|
||||
$this->layout()->setFlash("Zustimmungserklärung nicht gefunden", "error");
|
||||
$this->redirect("ConstructionConsent");
|
||||
}
|
||||
} else {
|
||||
$id = false;
|
||||
$mode = "add";
|
||||
}
|
||||
|
||||
$cc_id = $r->constructionconsent_id;
|
||||
$cc = new ConstructionConsent($cc_id);
|
||||
if(!$cc_id || !$cc->id) {
|
||||
$this->layout()->setFlash("Beim Speichern ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.", "error");
|
||||
$this->redirect("ConstructionConsent");
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$data["constructionconsent_id"] = $cc_id;
|
||||
$data["name"] = $r->name;
|
||||
$data["street"] = $r->street;
|
||||
$data["zip"] = $r->zip;
|
||||
$data["city"] = $r->city;
|
||||
$data["country"] = $r->country;
|
||||
$data["phone"] = $r->phone;
|
||||
$data["fax"] = $r->fax;
|
||||
$data["email"] = $r->email;
|
||||
|
||||
if($mode == "add") {
|
||||
$data["status"] = "new";
|
||||
$item = ConstructionConsentOwner::create($data);
|
||||
} else {
|
||||
$item->update($data);
|
||||
}
|
||||
|
||||
if(!$item->save()) {
|
||||
$this->layout()->setFlash("Beim Speichern ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.", "error");
|
||||
} else {
|
||||
$this->layout()->setFlash("Besitzer wurde erfolgreich gespeichert.", "success");
|
||||
}
|
||||
|
||||
$this->redirect("ConstructionConsent", "View", ["id" => $cc_id]);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,13 @@ $l["billing_period.12"] = "Jährlich";
|
||||
$l["billing_period.24"] = "Zweijährlich";
|
||||
$l["billing_period.46"] = "Dreijährlich";
|
||||
|
||||
$l["consent.building"] = "Gebäude";
|
||||
$l["consent.street"] = "Straße/Grunstück";
|
||||
$l["consent.new"] = "neu";
|
||||
$l["consent.requested"] = "Angefragt";
|
||||
$l["consent.answered"] = "Antwort erhalten";
|
||||
|
||||
|
||||
$l['cc.oesterreich'] = "AT";
|
||||
$l['cc.oestereich'] = "AT";
|
||||
$l['cc.osterreich'] = "AT";
|
||||
|
||||
BIN
public/assets/images/estmk-bb-logo-square.png
Normal file
BIN
public/assets/images/estmk-bb-logo-square.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
BIN
public/borderpoint-cc.png
Normal file
BIN
public/borderpoint-cc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
Reference in New Issue
Block a user