[Rt-devel] [PATCH]: Enable toggling of disabled custom fields in list

Philip Kime pkime at Shopzilla.com
Wed Jan 17 19:59:31 EST 2007


Couldn't see any way in 3.6.3 of including disabled custom fields in
listing. Here is a patch against
 
<rt>/share/html/Admin/CustomFields/index.html
 
which adds this capability, if nobody has already patched this ...
 
PK
 
=================
 
--- /usr/local/rt/share/html/Admin/CustomFields/index.html 2006-09-26
08:06:31.000000000 -0700
+++ /usr/local/rt/local/html/Admin/CustomFields/index.html 2007-01-17
16:53:08.179362688 -0800
@@ -72,8 +72,10 @@
 % }
 
 <form action="<%$RT::WebPath%>/Admin/CustomFields/index.html"
method="get">
+<input type="checkbox" class="checkbox" name="FindDisabledCFs"
value="1" /> <&|/l&>Include disabled custom fields in
listing.</&><br/><br/>
 <&|/l&>Only show custom fields for:</&>
 <select name="type">
+<option value="all" selected>All</option>
 % for (@types) {
 <option value="<% $_->[1] %>"><% $_->[0] %></option>
 % }
@@ -82,9 +84,14 @@
 
 <%args>
 $type => undef
+$FindDisabledCFs => 0
 </%args>
 <%INIT>
+undef $type if ($type eq "all");
 my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
+if ($FindDisabledCFs) {
+  $CustomFields->FindAllRows();
+}
 $CustomFields->UnLimit();
 $CustomFields->LimitToLookupType($type) if defined $type;
 $CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD =>
'Name' } );

 
--
Philip Kime
NOPS Systems Architect
310 401 0407
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070117/1cd631c9/attachment.htm


More information about the Rt-devel mailing list