diff options
Diffstat (limited to 'template/en/default/attachment')
-rw-r--r-- | template/en/default/attachment/create.html.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/attachment/createformcontents.html.tmpl | 30 | ||||
-rw-r--r-- | template/en/default/attachment/edit.html.tmpl | 44 | ||||
-rw-r--r-- | template/en/default/attachment/list.html.tmpl | 5 |
4 files changed, 34 insertions, 53 deletions
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index f440f4583..7ca4d4bba 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -34,10 +34,16 @@ header = header subheader = subheader style_urls = [ 'skins/standard/attachment.css' ] - javascript_urls = [ "js/attachment.js", "js/util.js" ] + javascript_urls = [ "js/attachment.js", "js/util.js", "js/TUI.js" ] doc_section = "attachments.html" %] +<script type="text/javascript"> +<!-- +TUI_hide_default('attachment_text_field'); +--> +</script> + <form name="entryform" method="post" action="attachment.cgi" enctype="multipart/form-data" onsubmit="return validateAttachmentForm(this)"> diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl index ad3a25bc6..9d2fa9f48 100644 --- a/template/en/default/attachment/createformcontents.html.tmpl +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -21,29 +21,27 @@ # Marc Schumann <wurblzap@gmail.com> #%] -<tr> +<tr class="attachment_data"> <th><label for="data">File</label>:</th> <td> - <em>Enter the path to the file on your computer.</em><br> - <input type="file" id="data" name="data" size="50" - [% IF Param("allow_attach_url") %] - onchange="DataFieldHandler()" - [% END %] - > + <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()"> </td> </tr> -[% IF Param("allow_attach_url") %] -<tr class="expert_fields"> - <th><label for="attachurl">AttachURL</label>:</th> +<tr class="attachment_text_field"> + <th><label for="attach_text">File</label>:</th> <td> - <em>URL to be attached instead.</em><br> - <input type="text" id="attachurl" name="attachurl" size="60" - maxlength="2000" - onkeyup="URLFieldHandler()" onblur="URLFieldHandler()"> + <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> -</tbody> -[% END %] <tr> <th><label for="description">Description</label>:</th> <td> diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 6a98a7f05..d1861a7d3 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -68,19 +68,17 @@ <span class="bz_edit">(<a href="javascript:toggle_attachment_details_visibility()">edit</a>)</span> [% END %] </div> - [% IF NOT attachment.isurl %] - <div class="details"> - [% attachment.filename FILTER html %] ([% attachment.contenttype FILTER html %]) - [% IF attachment.datasize %] - [%+ attachment.datasize FILTER unitconvert %] - [% ELSE %] - <em>deleted</em> - [% END %], created by [%+ INCLUDE global/user.html.tmpl who = attachment.attacher %] - [% IF attachment.isprivate %] - <span class="bz_private">Only visible to <strong>[% Param('insidergroup') FILTER html %]</strong></span> - [% END %] - </div> - [% END %] + <div class="details"> + [% attachment.filename FILTER html %] ([% attachment.contenttype FILTER html %]) + [% IF attachment.datasize %] + [%+ attachment.datasize FILTER unitconvert %] + [% ELSE %] + <em>deleted</em> + [% END %], created by [%+ INCLUDE global/user.html.tmpl who = attachment.attacher %] + [% IF attachment.isprivate %] + <span class="bz_private">Only visible to <strong>[% Param('insidergroup') FILTER html %]</strong></span> + [% END %] + </div> </div> <div id="attachment_information_edit"> <span class="bz_hide"> @@ -99,12 +97,6 @@ %] </div> - [% IF attachment.isurl %] - <input type="hidden" name="filename" - value="[% attachment.filename FILTER html %]"> - <input type="hidden" name="contenttypeentry" - value="[% attachment.contenttype FILTER html %]"> - [% ELSE %] <div id="attachment_filename"> <label for="filename">Filename:</label> <input type="text" size="20" class="text block[% editable_or_hide %]" @@ -138,7 +130,7 @@ [%+ 'checked="checked"' IF attachment.ispatch %]> <label for="ispatch">patch</label> </div> - [% END %] + <div class="readonly"> <div class="checkboxes"> <div id="attachment_isobsolete"> @@ -168,18 +160,6 @@ <div id="attachment_view_window"> [% IF !attachment.datasize %] <div><b>The content of this attachment has been deleted.</b></div> - [% ELSIF attachment.isurl %] - <div> - <a href="[% attachment.data FILTER html %]"> - [% IF attachment.datasize < 120 %] - [% attachment.data FILTER html %] - [% ELSE %] - [% attachment.data FILTER truncate(80) FILTER html %] - ... - [% attachment.data.match(".*(.{20})$").0 FILTER html %] - [% END %] - </a> - </div> [% ELSIF !Param("allow_attachment_display") %] <div id="view_disabled" > <p><b> diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 89eef1836..33d9a6c04 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -68,9 +68,8 @@ function toggle_display(link) { [% obsolete_attachments = obsolete_attachments + 1 %] [% END %] <tr id="a[% count %]" class="[% "bz_contenttype_" _ attachment.contenttype - FILTER css_class_quote UNLESS attachment.isurl %] + FILTER css_class_quote %] [% " bz_patch" IF attachment.ispatch %] - [% " bz_url" IF attachment.isurl %] [% " bz_private" IF attachment.isprivate %] [% " bz_tr_obsolete bz_default_hidden" IF attachment.isobsolete %]"> @@ -87,8 +86,6 @@ function toggle_display(link) { ([% attachment.datasize FILTER unitconvert %], [% IF attachment.ispatch %] patch) - [% ELSIF attachment.isurl %] - url) [% ELSE %] [%+ attachment.contenttype FILTER html %]) [% END %] |