summaryrefslogtreecommitdiffstats
path: root/template/en/default/global/textarea.html.tmpl
blob: 4a493f928304ffbfe954403425db07822f8fadd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Bug Tracking System.
  #
  # Contributor(s): Marc Schumann <wurblzap@gmail.com>
  #%]

[%# INTERFACE:
  #
  # id:             (optional) The "id"-attribute of the textarea.
  # name:           (optional) The "name"-attribute of the textarea.
  # accesskey:      (optional) The "accesskey"-attribute of the textarea.
  # style:          (optional) The "style"-attribute of the textarea.
  # classes:        (optional) The "class"-attribute of the textarea.
  # wrap:           (deprecated; optional) The "wrap"-attribute of the textarea.
  # disabled:       (optional) Disable the textarea.
  # readonly:       (optional) Prevent the textarea from being edited.
  # minrows:        (required) Number of rows the textarea shall have initially
  #                 and when not having focus.
  # maxrows:        (optional) Number of rows the textarea shall have if
  #                 maximized (which happens on getting focus). If not given,
  #                 the textarea doesn't maximize when getting focus.
  # defaultrows:    (optional) Number of rows the textarea shall have if
  #                 the zoom_textareas user preference if off. If not given,
  #                 minrows will be used.
  # cols:           (required) Number of columns the textarea shall have.
  # defaultcontent: (optional) Default content for the textarea.
  # mandatory:      (optional) Boolean specifying whether or not the textarea
  #                 is mandatory.
  #%]

<textarea [% IF name %]name="[% name FILTER html %]"[% END %]
          [% IF id %] id="[% id FILTER html %]"[% END %]
          [% IF accesskey %] accesskey="[% accesskey FILTER html %]"[% END %]
          [% IF style %] style="[% style FILTER html %]"[% END %]
          [% IF classes %] class="[% classes FILTER html %]"[% END %]
          [% IF wrap %] wrap="[% wrap FILTER html %]"[% END %]
          [% IF disabled %] disabled="disabled"[% END %]
          [% IF readonly %] readonly="readonly"[% END %]
          [% IF defaultrows && user.settings.zoom_textareas.value == 'off' %]
            rows="[% defaultrows FILTER html %]"
          [% ELSE %]
            rows="[% minrows FILTER html %]"
          [% END %]
          cols="[% cols FILTER html %]"
          [% IF maxrows && user.settings.zoom_textareas.value == 'on' %]
            onFocus="this.rows=[% maxrows FILTER html %]"
          [% END %]
          [% IF mandatory %]
            aria-required="true"
          [% END %]
          [% IF onchange %]
            onchange="[% onchange FILTER html %]"
          [% END %]>[% defaultcontent FILTER html %]</textarea>