holiday-api/templates/dialogs/add-holiday.gohtml

35 lines
1.5 KiB
Plaintext
Raw Normal View History

<dialog class="card" id="create-card">
<h3 class="card-title">Create holiday</h3>
<form method="post" action="/admin/holidays">
<section>
<label for="country">Country:</label>
<select id="country" required name="country">
2023-08-05 19:34:09 +00:00
{{range $entry := .Countries}}
<option value="{{$entry.IsoName}}">{{$entry.Name}}</option>
{{end}}
</select>
</section>
<section>
<label for="name">Name:</label>
<input required id="name" name="name" type="text">
</section>
<section>
<label for="description">Description:</label>
<textarea id="description" name="description"></textarea>
</section>
<section>
<label for="date">Date:</label>
<input required id="date" name="date" type="date">
</section>
<section>
<label class="checkbox"><span>State holiday</span><input id="state_holiday" value="true" name="state_holiday" type="checkbox"></label>
</section>
<section>
<label class="checkbox"><span>Religious holiday</span><input id="religious_holiday" value="true" name="religious_holiday" type="checkbox"></label>
</section>
<section class="actions">
<button type="submit">Create</button>
<button type="button" onclick="closeDialog('#create-card')">Cancel</button>
</section>
</form>
</dialog>