Skip to content

Commit

Permalink
Formular für Touren
Browse files Browse the repository at this point in the history
  • Loading branch information
tabacha committed Jul 8, 2024
1 parent caf7535 commit 74f8d8a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
25 changes: 24 additions & 1 deletion static/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
<html>
<body>
<H1>ADFC tour2pdf Kurzanleitung</H1>
<p>
Um eine neue PDF Datei zu erzeugen, bitte diese Formular ausfüllen:
</p><p>
<form action="/api/pdf" method="get">
<input type="date" id="beginning" name="beginning"/>
<input type="date" id="end" name="end"/>
<input type="hidden" name="unitKey" value="158">
<input type="hidden" name="eventType" value="Radtour">
Maximale Anzahl an Touren: <input type="text" name="limit" value="30">
<input type="submit">
</form>
<script>
function toDateInputValue(dateObject){
const local = new Date(dateObject);
local.setMinutes(dateObject.getMinutes() - dateObject.getTimezoneOffset());
return local.toJSON().slice(0,10);
};
document.getElementById('beginning').value = toDateInputValue(new Date());
var end = new Date();
end.setDate(end.getDate() + 30);
document.getElementById('end').value = toDateInputValue(end);
</script>
</p>
<p>Oder:</p>

<p>1. Gehe auf https://touren-termine.adfc.de/ und mache eine gute Suche.</p>

<p>2. Nimm die URL, entferne den Teil:
<b>https://touren-termine.adfc.de/suche?</b>
und erstze ihn durch die URL die im Browser steht und den Wörtern: /api/pdf? oder /api/html?</p>

</body>
</html>

4 changes: 1 addition & 3 deletions templates/page.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</div>
{% if SHOW_API_LINK %}
<div class="API_LINK>
<b>API:</b> <a href=" https://api-touren-termine.adfc.de/api/eventItems/{{ event.eventItem.key }}">
<b>API:</b> <a href="https://api-touren-termine.adfc.de/api/eventItems/{{ event.eventItem.key }}">
https://api-touren-termine.adfc.de/api/eventItems/{{ event.eventItem.key }}</a>
</div>
{% endif %}
Expand All @@ -95,8 +95,6 @@
</div>
</div>
{% endif %}
{% endfor %}
<footer>
Expand Down

0 comments on commit 74f8d8a

Please sign in to comment.