[Rt-commit] rt branch, owner-autocomplete, updated. rt-3.8.8-487-gf0c87aa

Thomas Sibley trs at bestpractical.com
Thu Aug 19 18:22:14 EDT 2010


The branch, owner-autocomplete has been updated
       via  f0c87aae6ab131b50e6e2f035534005ea3b6dd01 (commit)
      from  a5f41c2ba13df030c4bf838374cc1c798cc7a363 (commit)

Summary of changes:
 lib/RT/Config.pm                |   10 ++++++++++
 share/html/Elements/SelectOwner |    3 ++-
 2 files changed, 12 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit f0c87aae6ab131b50e6e2f035534005ea3b6dd01
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Aug 19 18:21:18 2010 -0400

    Make $AutocompleteOwners user overrideable

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index b1ce131..c377308 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -177,6 +177,16 @@ our %META = (
             },
         },
     },
+    AutocompleteOwners => {
+        Section     => 'General',
+        Overridable => 1,
+        SortOrder   => 3.1,
+        Widget      => '/Widgets/Form/Boolean',
+        WidgetArguments => {
+            Description => 'Use autocomplete to find owners?', # loc
+            Hints       => 'Replaces the owner dropdowns with textboxes' #loc
+        }
+    },
     WebDefaultStylesheet => {
         Section         => 'General',                #loc
         Overridable     => 1,
diff --git a/share/html/Elements/SelectOwner b/share/html/Elements/SelectOwner
index 16fbfce..771b701 100755
--- a/share/html/Elements/SelectOwner
+++ b/share/html/Elements/SelectOwner
@@ -47,7 +47,8 @@
 %# END BPS TAGGED BLOCK }}}
 <& "SelectOwner$Widget", %ARGS, Objects => \@objects &>
 <%INIT>
-my $Widget = RT->Config->Get('AutocompleteOwner') ? 'Autocomplete' : 'Dropdown';
+my $Widget = RT->Config->Get('AutocompleteOwners', $session{'CurrentUser'})
+                ? 'Autocomplete' : 'Dropdown';
 
 my @objects;
 if ($TicketObj) {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list