category.go 572 B

1234567891011121314151617181920212223
  1. // Copyright 2017 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package form // import "miniflux.app/ui/form"
  5. import (
  6. "net/http"
  7. )
  8. // CategoryForm represents a feed form in the UI
  9. type CategoryForm struct {
  10. Title string
  11. HideGlobally string
  12. }
  13. // NewCategoryForm returns a new CategoryForm.
  14. func NewCategoryForm(r *http.Request) *CategoryForm {
  15. return &CategoryForm{
  16. Title: r.FormValue("title"),
  17. HideGlobally: r.FormValue("hide_globally"),
  18. }
  19. }