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.

44 lines
2.3 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. {{ $cols := .Get "cols" | default nil }}
  21. {{ $disabled := .Get "disabled" | default nil }}
  22. {{ $form := .Get "form" | default nil }}
  23. {{ $maxlength := .Get "maxlength" | default nil }}
  24. {{ $minlength := .Get "minlength" | default nil }}
  25. {{ $placeholder := .Get "placeholder" | default nil }}
  26. {{ $readonly := .Get "readonly" | default nil }}
  27. {{ $required := .Get "required" | default nil }}
  28. {{ $rows := .Get "rows" | default nil }}
  29. {{ $spellcheck := .Get "spellcheck" | default nil }}
  30. {{ $wrap := .Get "wrap" | default nil }}
  31. {{ $tabindex := .Get "tabindex" | default nil }}
  32. {{ $body := .Get "text" | default nil }}
  33. {{ partial "components/textarea.html" (dict "body" $body "attrs" (dict "id" $id "name" $name "class" $class "autocomplete" $autocomplete "autofocus" $autofocus "cols" $cols "disabled" $disabled "form" $form "maxlength" $maxlength "minlength" $minlength "placeholder" $placeholder "readonly" $readonly "required" $required "rows" $rows "spellcheck" $spellcheck "wrap" $wrap "tabindex" $tabindex)) }}
  34. {{ if eq "false" $autocomplete }}
  35. <p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid autocomplete value for textarea. Did you mean \"off\" instead of %q?" $autocomplete)) }}</p>
  36. {{ end }}
  37. {{ if eq "false" $wrap }}
  38. <p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid wrap value for textarea. Did you mean \"off\" instead of %q?" $wrap)) }}</p>
  39. {{ end }}