Report PDF emailing
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div>
|
||||
<p class="eyebrow">Reports</p>
|
||||
<h1>Build a temperature report</h1>
|
||||
<p class="muted">Choose a date range and export the summary as CSV.</p>
|
||||
<p class="muted">Choose a date range, export CSV, or send a PDF report.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -33,6 +33,25 @@
|
||||
<a class="button secondary" href="/reports.csv?start={{ start }}&end={{ end }}&device_id={{ device_id }}">Download CSV</a>
|
||||
</form>
|
||||
|
||||
<section class="panel report-email-panel">
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>Email PDF report</h2>
|
||||
<p class="muted">Creates a PDF using the selected range and device filter, then sends it via SMTP2GO.</p>
|
||||
</div>
|
||||
</div>
|
||||
<form class="report-form email-report-form" method="post" action="/reports/email-pdf">
|
||||
<input type="hidden" name="start" value="{{ start }}">
|
||||
<input type="hidden" name="end" value="{{ end }}">
|
||||
<input type="hidden" name="device_id" value="{{ device_id }}">
|
||||
<label>
|
||||
Email
|
||||
<input type="email" name="email" placeholder="recipient@example.com" required>
|
||||
</label>
|
||||
<button class="button" type="submit">Create and email PDF</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
|
||||
Reference in New Issue
Block a user