# 2005-06-29 wurblzap@gmail.com -- Bug 257767
add_setting ('csv_colsepchar', {',' => 1, ';' => 2 }, ',' );
+# 2005-10-26 wurblzap@gmail.com -- Bug 291459
+add_setting ("zoom_textareas", {"on" => 1, "off" => 2 }, "on" );
+
# 2005-10-21 LpSolit@gmail.com -- Bug 313020
add_setting('per_bug_queries', {'on' => 1, 'off' => 2}, 'on');
</tr>
<tr>
<th align="right">Description:</th>
- <td><textarea rows=4 cols=64 wrap=virtual name="description"></textarea></td>
+ <td>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 64
+ wrap = 'virtual'
+ %]
+ </td>
</tr>
</table>
<hr>
</tr>
<tr>
<th align="right">Description:</th>
- <td><textarea rows=4 cols=64 name="description">
- [% classification.description FILTER none %]</textarea>
+ <td>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 64
+ defaultcontent = classification.description
+ %]
</td>
</tr>
<tr valign=top>
<tr>
<th align="right">Description:</th>
<td>
- <textarea rows="4" cols="64" wrap="virtual"
- name="description"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 64
+ wrap = 'virtual'
+ %]
</td>
</tr>
<tr>
</tr>
<tr>
<td valign="top">Component Description:</td>
- <td><textarea rows="4" cols="64" wrap="virtual"
- name="description">[% comp.description FILTER html %]</textarea>
+ <td>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 64
+ wrap = 'virtual'
+ defaultcontent = comp.description
+ %]
</td>
</tr>
<tr>
<th>Description:</th>
<td>
a comprehensive description of this type<br>
- <textarea name="description" rows="4" cols="80">[% type.description FILTER html %]</textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 80
+ defaultcontent = type.description
+ %]
</td>
</tr>
<tr>
<th align="right">Description:</th>
<td>
- <textarea rows="4" cols="64" wrap="virtual"
- name="description"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 64
+ wrap = 'virtual'
+ %]
</td>
</tr>
</table>
<tr>
<th align="right">Description:</th>
<td>
- <textarea rows="4" cols="64" wrap="virtual"
- name="description">[% description FILTER html %]</textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 4
+ cols = 64
+ wrap = 'virtual'
+ defaultcontent = description
+ %]
</td>
</tr>
<tr>
<tr>
<th><label for="disabledtext">Disable text:</label></th>
<td>
- <textarea name="disabledtext" rows="10"
- id="disabledtext"
- cols="60">[% otheruser.disabledtext FILTER html %]</textarea><br />
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'disabledtext'
+ id = 'disabledtext'
+ minrows = 2
+ maxrows = 10
+ defaultrows = 10
+ cols = 60
+ defaultcontent = otheruser.disabledtext
+ %]<br>
(If non-empty, then the account will be disabled, and this text should
explain why.)
[% IF editform %]
<th><label for="comment">Comment:</label></th>
<td>
<em>(optional) Add a comment about this attachment to the [% terms.bug %].</em><br>
- <textarea wrap="soft" id="commment" name="comment" rows="6" cols="80"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'comment'
+ id = 'comment'
+ minrows = 6
+ maxrows = 15
+ cols = 80
+ wrap = 'soft'
+ %]
</td>
</tr>
<tr>
<td width="25%">
<small>
<b>Description:</b><br>
- <textarea rows="3" cols="25" name="description" wrap="soft">
- [%- attachment.description FILTER html %]</textarea><br>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'description'
+ minrows = 3
+ cols = 25
+ wrap = 'soft'
+ defaultcontent = attachment.description
+ %]<br>
[% IF attachment.isurl %]
<input type="hidden" name="filename"
<div id="smallCommentFrame">
<b>Comment (on the [% terms.bug %]):</b><br>
- <textarea name="comment" rows="5" cols="25" wrap="soft"></textarea><br>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'comment'
+ minrows = 5
+ cols = 25
+ wrap = 'soft'
+ %]<br>
</div>
<input type="submit" value="Submit"><br><br>
[% IF isviewable %]
<td width="75%">
- <textarea id="editFrame" name="comment" wrap="soft" cols="80"
- style="height: 400px; width: 100%; display: none;"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ id = 'editFrame'
+ name = 'comment'
+ style = 'height: 400px; width: 100%; display: none'
+ minrows = 10
+ cols = 80
+ wrap = 'soft'
+ %]
<iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %]" style="height: 400px; width: 100%;">
<b>You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
<a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b>
<b>Details</b>
</td>
<td valign="top">
- <textarea rows="6" cols="80" name="comment"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'comment'
+ minrows = 6
+ cols = 80
+ %]
<p>
Expand on the Summary. Please be
as specific as possible about what is wrong.
<b>Steps to Reproduce</b>
</td>
<td valign="top">
-<textarea rows="4" cols="80" name="reproduce_steps">
-1.
-2.
-3.
-</textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'reproduce_steps'
+ minrows = 4
+ cols = 80
+ defaultcontent = "1.\n2.\n3."
+ %]
<p>
Describe how to reproduce the problem, step by
step. Include any special setup steps.
<b>Actual Results</b>
</td>
<td valign="top">
- <textarea rows="4" cols="80" name="actual_results"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'actual_results'
+ minrows = 4
+ cols = 80
+ %]
<p>
What happened after you performed the steps above?
</p>
<b>Expected Results</b>
</td>
<td valign="top">
- <textarea rows="4" cols="80" name="expected_results"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'expected_results'
+ minrows = 4
+ cols = 80
+ %]
<p>
What should the software have done instead?
</p>
<b>Additional Information</b>
</td>
<td valign="top">
- <textarea rows="8" cols="80" name="additional_info"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'additional_info'
+ minrows = 8
+ cols = 80
+ %]
<p>
Add any additional information you feel may be
relevant to this [% terms.bug %], such as the <b>theme</b> you were
<tr><td align="right" valign="top"><strong>Description:</strong></td>
<td colspan="3">
- <textarea name="comment" rows="10" cols="80">
+ [% defaultcontent = BLOCK %]
[% IF cloned_bug_id %]
+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++
[% END %]
- [% comment FILTER html %]</textarea>
+ [% comment FILTER html %]
+ [%- END %]
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'comment'
+ minrows = 10
+ maxrows = 25
+ cols = 80
+ defaultcontent = defaultcontent
+ %]
<br>
</td>
</tr>
[% END %]
<br>
<a name="add_comment"></a>
- <textarea name="comment" id="comment" rows="10" cols="80"
- accesskey="c"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'comment'
+ id = 'comment'
+ minrows = 10
+ maxrows = 25
+ cols = 80
+ accesskey = 'c'
+ %]
[% IF NOT bug.cc || NOT bug.cc.contains(user.login) %]
<br>
"comment_sort_order" => "When viewing $terms.abug, show comments in this order",
"csv_colsepchar" => "Field separator character for CSV files",
"display_quips" => "Show a quip at the top of each bug list",
+ "zoom_textareas" => "Zoom textareas large when in use (requires JavaScript)",
"newest_to_oldest" => "Newest to Oldest",
"newest_to_oldest_desc_first" => "Newest to Oldest, but keep Description at the top",
"off" => "Off",
--- /dev/null
+[%# 1.0@bugzilla.org %]
+[%# 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.
+ # wrap: (deprecated; optional) The "wrap"-attribute of the textarea.
+ # 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.
+ #%]
+
+<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 wrap %] wrap="[% wrap FILTER html %]"[% 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 %]"
+ onBlur="this.rows=[% minrows FILTER html %]"
+ [% END %]>[% defaultcontent FILTER html %]</textarea>
</table>
<b><label for="comment">Additional Comments:</label></b><br>
-<textarea id="comment" name="comment" rows="5" cols="80"></textarea><br>
+[% INCLUDE global/textarea.html.tmpl
+ name = 'comment'
+ id = 'comment'
+ minrows = 5
+ maxrows = 25
+ cols = 80
+%]<br>
[% IF groups.size > 0 %]
</p>
<form action="page.cgi" method="post">
- <textarea cols="80" rows="20" name="text"></textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = 'text'
+ minrows = 20
+ cols = 80
+ %]
<br>
<input type="hidden" name="id" value="linked.html">
<input value="Linkify" type="submit">
Descriptive text sent within whine message:
</td>
<td>
- <textarea name="event_[% event.key %]_body"
- rows="5" cols="80">
- [% event.value.body FILTER html %]</textarea>
+ [% INCLUDE global/textarea.html.tmpl
+ name = "event_${event.key}_body"
+ minrows = 3
+ maxrows = 10
+ defaultrows = 5
+ cols = 80
+ defaultcontent = event.value.body
+ %]
</td>
</tr>