[Bps-public-commit] r17165 - in RT-FormTools: lib/RT/Extension
sartak at bestpractical.com
sartak at bestpractical.com
Wed Dec 10 16:01:49 EST 2008
Author: sartak
Date: Wed Dec 10 16:01:48 2008
New Revision: 17165
Modified:
RT-FormTools/html/FormTools/Field
RT-FormTools/lib/RT/Extension/FormTools.pm
Log:
First stab at handling the default Attach field
Modified: RT-FormTools/html/FormTools/Field
==============================================================================
--- RT-FormTools/html/FormTools/Field (original)
+++ RT-FormTools/html/FormTools/Field Wed Dec 10 16:01:48 2008
@@ -55,10 +55,19 @@
% if ($field_type eq 'core') {
-<input type="text" name=<%$name%> size="20" value="<%$default%>">
+% if ($name eq 'Attach') {
+
+<input name="<%$name%>" type="file" />
+<input type="hidden" class="hidden" name="UpdateAttach" value="1" />
% } else {
+<input type="text" name=<%$name%> size="20" value="<%$default%>">
+
+% }
+
+% } else { # CF
+
% if ($render_as eq 'normal') {
<& /Elements/EditCustomField, Object => $queue, CustomField => $cf, NamePrefix => $NamePrefix,
Modified: RT-FormTools/lib/RT/Extension/FormTools.pm
==============================================================================
--- RT-FormTools/lib/RT/Extension/FormTools.pm (original)
+++ RT-FormTools/lib/RT/Extension/FormTools.pm Wed Dec 10 16:01:48 2008
@@ -18,7 +18,7 @@
=cut
sub is_core_field {
- return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent)$/;
+ return $_[0] =~ /^(Requestors|Cc|AdminCc|Subject|UpdateContent|Attach)$/;
}
1;
More information about the Bps-public-commit
mailing list