Compare commits
3 commits
4944e47e76
...
3f8d42571b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3f8d42571b |
||
33628331f4 | |||
938d10c3a6 |
2 changed files with 5 additions and 6 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
|
||||||
|
@ -346,9 +347,6 @@ func (h *GetWebNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
h.PageData.Err = fmt.Errorf("jriou")
|
|
||||||
h.Templates.ExecuteTemplate(w, templateName, h.PageData)
|
|
||||||
|
|
||||||
h.PageData.Note = note
|
h.PageData.Note = note
|
||||||
|
|
||||||
h.logger.Debug("rendering note web page")
|
h.logger.Debug("rendering note web page")
|
||||||
|
@ -427,6 +425,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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<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 disabled>Expiration</option>
|
||||||
{{range .Expirations}}
|
{{range $exp := .Expirations}}
|
||||||
<option value="{{.}}">{{HumanDuration .}}</option>
|
<option {{ if eq $exp $.Expiration }}selected="selected"{{end}} value="{{$exp}}">{{HumanDuration $exp}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue