2023-08-05 15:50:40 +00:00
|
|
|
<dialog class="card" id="update-card">
|
|
|
|
<h3 class="card-title">Edit holiday</h3>
|
|
|
|
<form method="post" action="/admin/holidays">
|
|
|
|
<input type="hidden" name="id" value="{{.Holiday.Id}}">
|
|
|
|
<section>
|
|
|
|
<label for="country">Country:</label>
|
|
|
|
<select id="country" required name="country">
|
2023-08-05 19:34:09 +00:00
|
|
|
{{range $entry := .Countries}}
|
|
|
|
<option {{if eq $.Holiday.Country $entry.IsoName}}selected{{end}} value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
|
|
|
{{end}}
|
2023-08-05 15:50:40 +00:00
|
|
|
</select>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<label for="name">Name:</label>
|
|
|
|
<input required id="name" value="{{.Holiday.Name}}" name="name" type="text">
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<label for="description">Description:</label>
|
|
|
|
<textarea id="description" name="description">{{.Holiday.Description}}</textarea>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<label for="date">Date:</label>
|
|
|
|
<input required id="date" value="{{.Holiday.Date.Format "2006-01-02"}}" name="date" type="date">
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<label class="checkbox"><span>State holiday</span><input id="state_holiday" value="true" {{if .Holiday.IsStateHoliday}}checked{{end}} name="state_holiday" type="checkbox"></label>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<label class="checkbox"><span>Religious holiday</span><input id="religious_holiday" value="true" {{if .Holiday.IsReligiousHoliday}}checked{{end}} name="religious_holiday" type="checkbox"></label>
|
|
|
|
</section>
|
|
|
|
<section class="actions">
|
|
|
|
<button type="submit">Update</button>
|
|
|
|
<button type="button" onclick="closeDialog('#update-card')">Cancel</button>
|
|
|
|
</section>
|
|
|
|
</form>
|
|
|
|
</dialog>
|