1
0
Fork 0
forked from jriou/coller

Compare commits

..

No commits in common. "33628331f4330712781e2b3170236b16b24d9bc2" and "401397241b9c93f42854eb411c8a391da011d81f" have entirely different histories.

2 changed files with 6 additions and 5 deletions

View file

@ -189,7 +189,6 @@ type PageData struct {
Title string
Version string
Expirations []int
Expiration int
Languages []string
Err error
URL string
@ -346,6 +345,9 @@ func (h *GetWebNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
h.PageData.Err = fmt.Errorf("jriou")
h.Templates.ExecuteTemplate(w, templateName, h.PageData)
h.PageData.Note = note
h.logger.Debug("rendering note web page")
@ -424,7 +426,6 @@ func (s *Server) Start() error {
p := PageData{
Title: s.config.Title,
Expirations: s.config.Expirations,
Expiration: s.config.Expiration,
Languages: s.config.Languages,
}

View file

@ -36,9 +36,9 @@
</div>
<div class="col">
<select class="form-select" aria-label="Expiration" id="expiration" name="expiration">
<option disabled>Expiration</option>
{{range $exp := .Expirations}}
<option {{ if eq $exp $.Expiration }}selected="selected"{{end}} value="{{$exp}}">{{HumanDuration $exp}}</option>
<option selected="selected" disabled>Expiration</option>
{{range .Expirations}}
<option value="{{.}}">{{HumanDuration .}}</option>
{{end}}
</select>
</div>