forked from jriou/coller
feat: set default expiration in select
This commit is contained in:
parent
401397241b
commit
16945d488a
2 changed files with 3 additions and 1 deletions
|
@ -189,6 +189,7 @@ type PageData struct {
|
||||||
Title string
|
Title string
|
||||||
Version string
|
Version string
|
||||||
Expirations []int
|
Expirations []int
|
||||||
|
Expiration int
|
||||||
Languages []string
|
Languages []string
|
||||||
Err error
|
Err error
|
||||||
URL string
|
URL string
|
||||||
|
@ -426,6 +427,7 @@ func (s *Server) Start() error {
|
||||||
p := PageData{
|
p := PageData{
|
||||||
Title: s.config.Title,
|
Title: s.config.Title,
|
||||||
Expirations: s.config.Expirations,
|
Expirations: s.config.Expirations,
|
||||||
|
Expiration: s.config.Expiration,
|
||||||
Languages: s.config.Languages,
|
Languages: s.config.Languages,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
|
||||||
<option selected="selected" disabled>Expiration</option>
|
<option selected="selected" disabled>{{HumanDuration .Expiration}}</option>
|
||||||
{{range .Expirations}}
|
{{range .Expirations}}
|
||||||
<option value="{{.}}">{{HumanDuration .}}</option>
|
<option value="{{.}}">{{HumanDuration .}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue