[Rt-commit] rt branch, 4.4/enhance-roles-input-fields, repushed
Maureen Mirville
maureen at bestpractical.com
Thu Jan 31 17:43:13 EST 2019
The branch 4.4/enhance-roles-input-fields was deleted and repushed:
was 2d1bf0d7d317cf98cc18d972d31ffa8974a3c8cf
now 3b4d8059b033288aa498ae97db07549ed8770613
1: e81709086 = 1: e81709086 Add the Selectize JS library source code to RT
2: 066876684 = 2: 066876684 Add a new config to format user input fields on ticket create/update pages
3: 4998089e4 = 3: 4998089e4 Add jQuery UI Sortable library source code to RT
4: 2d1bf0d7d ! 4: 3b4d8059b Improve style of user input fields using Selectize.js library
@@ -7,8 +7,57 @@
--- /dev/null
+++ b/share/html/Elements/FormatRolesInputFields
@@
++%# BEGIN BPS TAGGED BLOCK {{{
++%#
++%# COPYRIGHT:
++%#
++%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
++%# <sales at bestpractical.com>
++%#
++%# (Except where explicitly superseded by other copyright notices)
++%#
++%#
++%# LICENSE:
++%#
++%# This work is made available to you under the terms of Version 2 of
++%# the GNU General Public License. A copy of that license should have
++%# been provided with this software, but in any event can be snarfed
++%# from www.gnu.org.
++%#
++%# This work is distributed in the hope that it will be useful, but
++%# WITHOUT ANY WARRANTY; without even the implied warranty of
++%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++%# General Public License for more details.
++%#
++%# You should have received a copy of the GNU General Public License
++%# along with this program; if not, write to the Free Software
++%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++%# 02110-1301 or visit their web page on the internet at
++%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
++%#
++%#
++%# CONTRIBUTION SUBMISSION POLICY:
++%#
++%# (The following paragraph is not intended to limit the rights granted
++%# to you to modify and distribute this software under the terms of
++%# the GNU General Public License and is only of importance to you if
++%# you choose to contribute your changes and enhancements to the
++%# community by submitting them to Best Practical Solutions, LLC.)
++%#
++%# By intentionally submitting any modifications, corrections or
++%# derivatives to this work, or any other work intended for use with
++%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
++%# you are the copyright holder for those contributions and you grant
++%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
++%# royalty-free, perpetual, license to use, copy, create derivative
++%# works based on those contributions, and sublicense and distribute
++%# those contributions and any derivatives thereof.
++%#
++%# END BPS TAGGED BLOCK }}}
++
+<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/js/jquery-ui-sortable.min.js"></script>
+<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/js/selectize.min.js"></script>
++
+<script>
+
+jQuery(document).ready( function() {
@@ -50,14 +99,22 @@
+ });
+ }
+ });
++
+});
+
+</script>
+
+<%INIT>
+my @roles = $QueueObj->Roles;
-+#my $fields = join(",", map { '#' . $_ } @roles); "#AdminCc,#Cc,#Owner,#RT::CustomRole-1,#RT::CustomRole-2,#Requestor"
-+my $fields = '#Requestors, #Cc';
++# Add the 'Requestors' to roles as this field comes in without an 's'
++push @roles, 'Requestors';
++
++# Prepend '#' for each role to create the selector name
++my $fields = join(",", map { '#' . $_ } @roles);
++
++# Escape the :: for jquery from custom roles
++$fields =~ s/\:/\\\\\:/g;
++
+my $user_format = RT->Config->Get( 'AutocompleteUserInputFormat' );
+</%INIT>
+
More information about the rt-commit
mailing list