44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>Holiday-api holiday</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Holiday-api - {{if .Id}}Updating{{else}}Creating{{end}}</h1>
|
||
|
<p>Page for creating or editing holidays</p>
|
||
|
<a href="/admin">Back</a>
|
||
|
<form method="post" action="/admin/holiday">
|
||
|
{{if .Id}}
|
||
|
<input type="hidden" id="id" name="id" value="{{.Id}}">
|
||
|
{{end}}
|
||
|
|
||
|
<label for="country">Country</label>
|
||
|
<select id="country" name="country">
|
||
|
<option value="HR" {{if eq .Country "HR"}}selected{{end}}>Croatia</option>
|
||
|
<option value="US" {{if eq .Country "US"}}selected{{end}}>USA</option>
|
||
|
<option value="GB" {{if eq .Country "GB"}}selected{{end}}>Great Britain</option>
|
||
|
<option value="FR" {{if eq .Country "FR"}}selected{{end}}>France</option>
|
||
|
</select>
|
||
|
|
||
|
<label for="name">Name</label>
|
||
|
<input type="text" id="name" name="name" value="{{.Name}}">
|
||
|
|
||
|
<label for="description">Description</label>
|
||
|
<textarea id="description" name="description">{{.Description}}</textarea>
|
||
|
|
||
|
<label for="date">Date</label>
|
||
|
<input type="date" id="date" name="date" value="{{.Date.String}}">
|
||
|
|
||
|
<label for="state-holiday">State holiday</label>
|
||
|
<input type="checkbox" id="state-holiday" name="stateHoliday" {{if .IsStateHoliday}}checked{{end}}>
|
||
|
|
||
|
<label for="religious-holiday">Religious holiday</label>
|
||
|
<input type="checkbox" id="religious-holiday" name="religiousHoliday" {{if .IsReligiousHoliday}}checked{{end}}>
|
||
|
|
||
|
<button type="submit">{{if .Id}}Update{{else}}Create{{end}}</button>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|