37 lines
2.0 KiB
Plaintext
37 lines
2.0 KiB
Plaintext
<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">
|
|
<option {{if eq .Holiday.Country "HR"}}selected{{end}} value="HR">Croatia</option>
|
|
<option {{if eq .Holiday.Country "US"}}selected{{end}} value="US">United states</option>
|
|
<option {{if eq .Holiday.Country "FR"}}selected{{end}} value="FR">France</option>
|
|
<option {{if eq .Holiday.Country "GB"}}selected{{end}} value="GB">Great Britain</option>
|
|
</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> |