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

36 lines
1.9 KiB
Plaintext
Raw Normal View History

<dialog class="card" id="update-card">
2024-01-01 11:29:59 +00:00
<h3 class="card-title">Ažuriraj praznik</h3>
<form method="post" action="/admin/holidays">
<input type="hidden" name="id" value="{{.Holiday.Id}}">
2024-01-01 11:29:59 +00:00
<section class="form-field">
<label for="country">Država:</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}}
</select>
</section>
2024-01-01 11:29:59 +00:00
<section class="form-field">
<label for="name">Ime:</label>
<input required id="name" value="{{.Holiday.Name}}" name="name" type="text">
</section>
2024-01-01 11:29:59 +00:00
<section class="form-field">
<label for="description">Opis:</label>
<textarea id="description" name="description">{{.Holiday.Description}}</textarea>
</section>
2024-01-01 11:29:59 +00:00
<section class="form-field">
<label for="date">Datum:</label>
<input required id="date" value="{{.Holiday.Date.Format "2006-01-02"}}" name="date" type="date">
</section>
2024-01-01 11:29:59 +00:00
<section class="form-field">
<label class="checkbox"><span>Državni praznik</span><input id="state_holiday" value="true" {{if .Holiday.IsStateHoliday}}checked{{end}} name="state_holiday" type="checkbox"></label>
</section>
2024-01-01 11:29:59 +00:00
<section class="form-field">
<label class="checkbox"><span>Religiozni praznik</span><input id="religious_holiday" value="true" {{if .Holiday.IsReligiousHoliday}}checked{{end}} name="religious_holiday" type="checkbox"></label>
</section>
<section class="actions">
2024-01-01 11:29:59 +00:00
<button class="primary" type="submit">Ažuriraj</button>
<button class="secondary" type="button" onclick="closeDialog('#update-card')">Odustani</button>
</section>
</form>
</dialog>