fix: editing availability

This commit is contained in:
Max Hohlfeld 2025-06-22 22:36:34 +02:00
parent b65b4c7a00
commit f25e508bbd

View File

@ -9,7 +9,7 @@
date|fmt_date(DayMonthYear) }}</h1>
<input type="hidden" name="startdate" value="{{ date }}">
<input type="hidden" name="enddate" value="{{ date }}" id="enddate">
<input type="hidden" name="enddate" value="{{ enddate.as_ref().unwrap_or(date) }}" id="enddate">
<div class="field is-horizontal">
<div class="field-label">
@ -35,6 +35,7 @@
then if (value of the previous <input/>) is greater than (value of me)
then set the value of #enddate to "{{ datetomorrow }}"
then put "{{ datetomorrow|fmt_date(DayMonth) }}" into #ed
then set checked of #radionextday to true
end' />
</div>
</div>
@ -55,7 +56,7 @@
am selben Tag
</label>
<label class="radio ml-3">
<input type="radio" name="isovernight" {{ is_overnight|cond_show("checked")|safe }}
<input type="radio" id="radionextday" name="isovernight" {{ is_overnight|cond_show("checked")|safe }}
_='on click set the value of #enddate to "{{ datetomorrow }}"
then put "{{ datetomorrow|fmt_date(DayMonth) }}" into #ed'>
am Tag darauf
@ -80,7 +81,7 @@
<use href="/static/feather-sprite.svg#info" />
</svg>
{% let start_time = start.unwrap_or(NaiveTime::from_hms_opt(10, 0, 0).unwrap()) %}
{% let end_time = start.unwrap_or(NaiveTime::from_hms_opt(20, 0, 0).unwrap()) %}
{% let end_time = end.unwrap_or(NaiveTime::from_hms_opt(20, 0, 0).unwrap()) %}
verfügbar von {{ date|fmt_date(DayMonth) }} <span id="st">{{ start_time|fmt_time(HourMinute) }}</span> Uhr
bis <span id="ed">{{ enddate.as_ref().unwrap_or(date)|fmt_date(DayMonth) }}</span>
<span id="et">{{ end_time|fmt_time(HourMinute) }}</span> Uhr