Replaced chi v5 with gin
This commit is contained in:
1 parent
3df4c2dfaa
commit
484d60da70
8 files changed
+231
-294
No files matched your search
@@ -7,6 +7,9 @@
|
||||
<title>Holiday-api</title>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
* {font-family: system-ui}
|
||||
</style>
|
||||
<h1><a href="/admin">Holiday-api</a></h1>
|
||||
<p>Welcome to admin interface for holiday api</p>
|
||||
|
||||
@@ -40,26 +43,26 @@
|
||||
<label>State holiday</label>
|
||||
|
||||
<label for="state-holiday-true">True</label>
|
||||
<input type="radio" value="true" {{if boolcmp .search.StateHoliday "true"}}checked{{end}} id="state-holiday-true" name="stateHoliday">
|
||||
<input type="radio" value="true" {{if boolcmp .search.StateHoliday "true"}}checked{{end}} id="state-holiday-true" name="state_holiday">
|
||||
|
||||
<label for="state-holiday-false">False</label>
|
||||
<input type="radio" value="false" {{if boolcmp .search.StateHoliday "false"}}checked{{end}} id="state-holiday-false" name="stateHoliday">
|
||||
<input type="radio" value="false" {{if boolcmp .search.StateHoliday "false"}}checked{{end}} id="state-holiday-false" name="state_holiday">
|
||||
|
||||
<label for="state-holiday-any">Any</label>
|
||||
<input type="radio" value="" {{if boolcmp .search.StateHoliday "nil"}}checked{{end}} id="state-holiday-any" name="stateHoliday">
|
||||
<input type="radio" value="" {{if boolcmp .search.StateHoliday "nil"}}checked{{end}} id="state-holiday-any" name="state_holiday">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>Religious holiday</label>
|
||||
|
||||
<label for="religious-holiday-true">True</label>
|
||||
<input type="radio" value="true" {{if boolcmp .search.ReligiousHoliday "true"}}checked{{end}} id="religious-holiday-true" name="religiousHoliday">
|
||||
<input type="radio" value="true" {{if boolcmp .search.ReligiousHoliday "true"}}checked{{end}} id="religious-holiday-true" name="religious_holiday">
|
||||
|
||||
<label for="religious-holiday-false">False</label>
|
||||
<input type="radio" value="false" {{if boolcmp .search.ReligiousHoliday "false"}}checked{{end}} id="religious-holiday-false" name="religiousHoliday">
|
||||
<input type="radio" value="false" {{if boolcmp .search.ReligiousHoliday "false"}}checked{{end}} id="religious-holiday-false" name="religious_holiday">
|
||||
|
||||
<label for="religious-holiday-any">Any</label>
|
||||
<input type="radio" value="" {{if boolcmp .search.ReligiousHoliday "nil"}}checked{{end}} id="religious-holiday-any" name="religiousHoliday">
|
||||
<input type="radio" value="" {{if boolcmp .search.ReligiousHoliday "nil"}}checked{{end}} id="religious-holiday-any" name="religious_holiday">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
<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}}>
|
||||
<input type="checkbox" id="state-holiday" value="true" 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}}>
|
||||
<input type="checkbox" id="religious-holiday" value="true" name="religiousHoliday" {{if .IsReligiousHoliday}}checked{{end}}>
|
||||
|
||||
<button type="submit">{{if .Id}}Update{{else}}Create{{end}}</button>
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user