PDF-Generator für Eventschluss; CSRF-Protection
This commit is contained in:
@@ -21,6 +21,22 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<h1>{{ __('app.preapplication.edit.download.title') }}</h1>
|
||||
<p>{{ __('app.preapplication.edit.download.description') }}</p>
|
||||
<div class="eingabemaske">
|
||||
<form action="{{ route('generatePDF') }}" method="GET">
|
||||
<label for="event_id">{{ __('app.preapplication.region') }}:</label>
|
||||
<select id="event_id" name="event_id">
|
||||
@foreach(ChaosEvents::all() as $event)
|
||||
<option value="{{ $event->id }}">{{ $event->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<br /><br />
|
||||
<button type="submit">{{ __('app.preapplication.edit.download.button') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
<br /><br />
|
||||
|
||||
<h1>{{ __("app.preapplication.edit.title") }}</h1>
|
||||
<p>{{ __("app.preapplication.edit.description") }}</p>
|
||||
|
||||
|
||||
@@ -4,10 +4,18 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>C3Gov - {{ __('app.subtitle') }}</title>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset("favicon.ico") }}">
|
||||
<link rel="stylesheet" href="{{ asset("css/style.css") . "?rnd=" . rand(0, 1000000000) }}">
|
||||
<script src="{{ asset("js/jquery/jquery-4.0.0.min.js") }}"></script>
|
||||
<script src="{{ asset("js/web.js") }}"></script>
|
||||
<script>
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@yield('scripts')
|
||||
</head>
|
||||
<body>
|
||||
|
||||
93
resources/views/pdf/pre_application.blade.php
Normal file
93
resources/views/pdf/pre_application.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
@php
|
||||
$logoPath = public_path('Dokumente/c3govsticker.png');
|
||||
$logoData = base64_encode(file_get_contents($logoPath));
|
||||
$logoSrc = 'data:image/png;base64,' . $logoData;
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<title>Voranträge</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<style>
|
||||
#logo {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page {
|
||||
page-break-before: always;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stampfield {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
right: 50px;
|
||||
width: 90%;
|
||||
height: 50%;
|
||||
border: 1px solid black;
|
||||
padding: 5px;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1 class="center">Voranträge gem. § 5 C3GovVerwV für die (temporäre) Bz.Reg.-Erw.</h1>
|
||||
<h1 class="center">{{ $event->name }}</h1>
|
||||
<h2 class="center">der Bezirksregion CCC</h2>
|
||||
<h3 style="text-align: center;">Gültig vom {{ $event->from_date_visible->toDateString() }} bis einschließlich dem {{ $event->to_date_visible->toDateString() }}</h3>
|
||||
<img style="display: block; margin: 41%; width: 150px; height: 150px;" src="{{ $logoSrc }}">
|
||||
</div>
|
||||
@foreach($applications as $application)
|
||||
<div class="page">
|
||||
<div style="position: relative;">
|
||||
<img id="logo" src="{{ $logoSrc }}">
|
||||
<h1>Vorantrag {{ $application->reference_number }}</h1>
|
||||
<br /><br />
|
||||
<p>Folgende Entität hat einen Vorantrag gemäß § 5 C3GovVerwV gestellt:</p>
|
||||
<br /><br />
|
||||
<table>
|
||||
<tr>
|
||||
<td>Vorname:</td>
|
||||
<td>{{ $application->first_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nachname:</td>
|
||||
<td>{{ $application->last_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ort/Hackspace:</td>
|
||||
<td>{{ $application->location }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Datenbankerfassung am:</td>
|
||||
<td>{{ $application->created_at }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Interne Notizen:</td>
|
||||
<td>{{ $application->notes }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
<p>Obige Angaben sind vor Ausstellung zu prüfen und mittels Formblatt 5 zu genehmigen.</p>
|
||||
<br /><br /><br />
|
||||
<div class="stampfield">
|
||||
<div class="center">Bearbeitungsvermerke</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user