[bugzilla-gnome-org-customizations] template overrides: Add an override of createformcontents.html.tmpl
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-customizations] template overrides: Add an override of createformcontents.html.tmpl
- Date: Sun, 8 Feb 2015 20:37:44 +0000 (UTC)
commit 7e8b707527dd14c741255a57bf04a91291bf8520
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Mon Jan 26 23:06:56 2015 +0100
template overrides: Add an override of createformcontents.html.tmpl
Currently is the same as original. Changes will be added in following
commit.
extensions/TemplateOverrides/lib/Digests.pm | 1 +
.../attachment/createformcontents.html.tmpl | 98 ++++++++++++++++++++
2 files changed, 99 insertions(+), 0 deletions(-)
---
diff --git a/extensions/TemplateOverrides/lib/Digests.pm b/extensions/TemplateOverrides/lib/Digests.pm
index 91eaf5b..9a64834 100644
--- a/extensions/TemplateOverrides/lib/Digests.pm
+++ b/extensions/TemplateOverrides/lib/Digests.pm
@@ -17,6 +17,7 @@ our @EXPORT = qw(
sub overrides_digests {
my %digests = (
+ 'attachment/createformcontents.html.tmpl' =>
'8b13c491bd55ec3d63230a38d5e8ce6fce9e59ee94cc33599ee3fae5e31516ac',
'attachment/edit.html.tmpl' => '426ceeb820cefad35cbbf10ab053c1fc9f53fa71a63dd455418bff3221a46a0e',
'attachment/list.html.tmpl' => 'b0c5edd84b8cc31666d0d0b4bf36cdb981ee322995dad891cf05f0f40b2d0392',
'bug/comments.html.tmpl' => 'd68e98b67eac9cd74ec7b0b663734f7a14953788864135be076a8cb03d648f09',
diff --git a/extensions/TemplateOverrides/template/en/default/attachment/createformcontents.html.tmpl
b/extensions/TemplateOverrides/template/en/default/attachment/createformcontents.html.tmpl
new file mode 100644
index 0000000..48e4f4a
--- /dev/null
+++ b/extensions/TemplateOverrides/template/en/default/attachment/createformcontents.html.tmpl
@@ -0,0 +1,98 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+[% max_local = Param('maxlocalattachment') * 1024 %]
+[% max_limit = Param('maxattachmentsize')> max_local ? Param('maxattachmentsize') : max_local %]
+<tr class="attachment_data">
+ <th><label for="data">File</label>:</th>
+ <td>
+ <em>Enter the path to the file on your computer</em> (or
+ <a id="attachment_data_controller" href="javascript:TUI_toggle_class('attachment_text_field');
+ javascript:TUI_toggle_class('attachment_data')"
+ >paste text as attachment</a>).<br>
+ <input type="file" id="data" name="data" size="50" onchange="DataFieldHandler()">
+ <br><em>(File size limit: [% max_limit FILTER html %] KB)</em>
+ </td>
+</tr>
+<tr class="attachment_text_field">
+ <th><label for="attach_text">File</label>:</th>
+ <td>
+ <em>Paste the text to be added as an attachment</em> (or
+ <a id="attachment_text_field_controller" href="javascript:TUI_toggle_class('attachment_text_field');
+ javascript:TUI_toggle_class('attachment_data')"
+ >attach a file</a>).<br>
+ <textarea id="attach_text" name="attach_text" cols="80" rows="15"
+ onkeyup="TextFieldHandler()" onblur="TextFieldHandler()"></textarea>
+ </td>
+</tr>
+<tr>
+ <th class="required"><label for="description">Description</label>:</th>
+ <td>
+ <em>Describe the attachment briefly.</em><br>
+ <input type="text" id="description" name="description" class="required"
+ size="60" maxlength="200">
+ </td>
+</tr>
+<tr[% ' class="expert_fields"' UNLESS bug.id %]>
+ <th>Content Type:</th>
+ <td>
+ <em>If the attachment is a patch, check the box below.</em><br>
+ <input type="checkbox" id="ispatch" name="ispatch" value="1"
+ onchange="setContentTypeDisabledState(this.form);">
+ <label for="ispatch">patch</label><br><br>
+ [%# Reset this whenever the page loads so that the JS state is up to date %]
+ <script type="text/javascript">
+ YAHOO.util.Event.onDOMReady(function() {
+ bz_fireEvent(document.getElementById('ispatch'), 'change');
+ });
+ </script>
+
+ <em>Otherwise, choose a method for determining the content type.</em><br>
+ <input type="radio" id="autodetect"
+ name="contenttypemethod" value="autodetect" checked="checked">
+ <label for="autodetect">auto-detect</label><br>
+ <input type="radio" id="list"
+ name="contenttypemethod" value="list">
+ <label for="list">select from list</label>:
+ <select name="contenttypeselection" id="contenttypeselection"
+ onchange="this.form.contenttypemethod[1].checked = true;">
+ [% PROCESS content_types %]
+ </select><br>
+ <input type="radio" id="manual"
+ name="contenttypemethod" value="manual">
+ <label for="manual">enter manually</label>:
+ <input type="text" name="contenttypeentry" id="contenttypeentry"
+ size="30" maxlength="200"
+ onchange="if (this.value) this.form.contenttypemethod[2].checked = true;">
+ </td>
+</tr>
+<tr[% ' class="expert_fields"' UNLESS bug.id %]>
+ <td> </td>
+ <td>
+ [% IF flag_types && flag_types.size > 0 %]
+ [% PROCESS "flag/list.html.tmpl" %]<br>
+ [% END %]
+ </td>
+</tr>
+
+[% BLOCK content_types %]
+ [% mimetypes = [{type => "text/plain", desc => "plain text"},
+ {type => "text/html", desc => "HTML source"},
+ {type => "application/xml", desc => "XML source"},
+ {type => "image/gif", desc => "GIF image"},
+ {type => "image/jpeg", desc => "JPEG image"},
+ {type => "image/png", desc => "PNG image"},
+ {type => "application/pdf", desc => "PDF document"},
+ {type => "application/octet-stream", desc => "binary file"}]
+ %]
+ [% Hook.process("mimetypes", "attachment/createformcontents.html.tmpl") %]
+
+ [% FOREACH m = mimetypes %]
+ <option value="[% m.type FILTER html %]">[% m.desc FILTER html %] ([% m.type FILTER html %])</option>
+ [% END %]
+[% END %]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]