You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.7 KiB

4 years ago
  1. {{/*
  2. Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
  3. This file is part of After Dark.
  4. After Dark is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. After Dark is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. */ -}}
  15. {{ $id := .Get "id" | default nil }}
  16. {{ $name := .Get "name" | default nil }}
  17. {{ $class := .Get "class" | default nil }}
  18. {{ $autocomplete := .Get "autocomplete" | default nil }}
  19. {{ $autofocus := .Get "autofocus" | default nil }}
  20. {{ $disabled := .Get "disabled" | default nil }}
  21. {{ $form := .Get "form" | default nil }}
  22. {{ $formaction := .Get "formaction" | default nil }}
  23. {{ $formmethod := .Get "formmethod" | default nil }}
  24. {{ $formtarget := .Get "formtarget" | default nil }}
  25. {{ $height := .Get "height" | default nil }}
  26. {{ $max := .Get "max" | default nil }}
  27. {{ $maxlength := .Get "maxlength" | default nil }}
  28. {{ $min := .Get "min" | default nil }}
  29. {{ $minlength := .Get "minlength" | default nil }}
  30. {{ $multiple := .Get "multiple" | default nil }}
  31. {{ $pattern := .Get "pattern" | default nil }}
  32. {{ $placeholder := .Get "placeholder" | default nil }}
  33. {{ $readonly := .Get "readonly" | default nil }}
  34. {{ $required := .Get "required" | default nil }}
  35. {{ $size := .Get "size" | default nil }}
  36. {{ $spellcheck := .Get "spellcheck" | default nil }}
  37. {{ $step := .Get "step" | default nil }}
  38. {{ $tabindex := .Get "tabindex" | default nil }}
  39. {{ $type := .Get "type" | default nil }}
  40. {{ $value := .Get "value" | default nil }}
  41. {{ $width := .Get "width" | default nil }}
  42. {{ partial "components/textinput.html" (dict "attrs" (dict "id" $id "name" $name "class" $class "autocomplete" $autocomplete "autofocus" $autofocus "disabled" $disabled "form" $form "formaction" $formaction "formmethod" $formmethod "formtarget" $formtarget "height" $height "max" $max "maxlength" $maxlength "min" $min "minlength" $minlength "multiple" $multiple "pattern" $pattern "placeholder" $placeholder "readonly" $readonly "required" $required "size" $size "spellcheck" $spellcheck "step" $step "tabindex" $tabindex "type" $type "value" $value "width" $width)) }}
  43. {{ if eq "false" $autocomplete }}
  44. <p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for textinput. Did you mean \"off\" instead of %q?" $autocomplete)) }}</p>
  45. {{ end }}