[Rt-commit] rt branch, 5.0/display-custom-role-hint, created. rt-5.0.0alpha1-27-g8cf2c6085

Michel Rodriguez michel at bestpractical.com
Tue Mar 17 14:33:04 EDT 2020


The branch, 5.0/display-custom-role-hint has been created
        at  8cf2c608551edd3fd18e7fb203e025c811ac05d6 (commit)

- Log -----------------------------------------------------------------
commit 8cf2c608551edd3fd18e7fb203e025c811ac05d6
Author: michel <michel at bestpractical.com>
Date:   Tue Mar 17 18:54:34 2020 +0100

    Display Entry Hint for single user custom roles as a hint on a (?) icon.
    
    This makes it consistent with hints for other fields.

diff --git a/share/html/Elements/SingleUserRoleInput b/share/html/Elements/SingleUserRoleInput
index fdb8fff73..b982d2727 100644
--- a/share/html/Elements/SingleUserRoleInput
+++ b/share/html/Elements/SingleUserRoleInput
@@ -49,7 +49,6 @@
     Name => $role->GroupType,
     Size => $Size,
     ($ShowPlaceholder ? (Placeholder => loc(RT->Nobody->Name)) : ()),
-    ($ShowEntryHint ? (EntryHint => $role->EntryHint) : ()),
     Default => $Default,
     Autocomplete => 1,
     AutocompleteReturn => "Name",
diff --git a/share/html/Ticket/Elements/EditBasics b/share/html/Ticket/Elements/EditBasics
index 2ece8b3cd..46f8c71a5 100644
--- a/share/html/Ticket/Elements/EditBasics
+++ b/share/html/Ticket/Elements/EditBasics
@@ -149,6 +149,7 @@ unless ($ExcludeCustomRoles) {
     while (my $role = $roles->Next) {
         push @role_fields, {
             name => $role->Name,
+            hint => $role->EntryHint,
             comp => '/Elements/SingleUserRoleInput',
             args => {
                 role    => $role,
@@ -183,7 +184,11 @@ for my $field (@fields) {
 % }
 % for my $field (@fields) {
   <div class="form-row">
-    <div class="label col-md-3"><% loc($field->{'name'}) %>:</div>
+    <div class="label col-md-3"><% loc($field->{'name'}) %>:
+%     if ( my $hint = $field->{hint} ) {
+          <span class="far fa-question-circle icon-helper" data-toggle="tooltip" data-placement="top" data-original-title="<% $hint %>"></span>
+%     }
+    </div>
     <div class="value col-md-9"><% $field->{'html'} |n %></div>
   </div>
 % }
diff --git a/share/html/Ticket/Elements/EditPeople b/share/html/Ticket/Elements/EditPeople
index 7899187d4..108921d1e 100644
--- a/share/html/Ticket/Elements/EditPeople
+++ b/share/html/Ticket/Elements/EditPeople
@@ -88,7 +88,11 @@
 % $m->callback( CustomRoles => $single_roles, SingleRoles => 1, Ticket => $Ticket, %ARGS, CallbackName => 'ModifyCustomRoles' );
 % while (my $role = $single_roles->Next) {
 <div class="form-row">
-  <div class="col-md-3 label"><% $role->Name %>:</div>
+  <div class="col-md-3 label"><% $role->Name %>:
+%   if ( my $hint = $role->EntryHint ) {
+        <span class="far fa-question-circle icon-helper" data-toggle="tooltip" data-placement="top" data-original-title="<% $hint %>"></span>
+%   }
+  </div>
   <div class="col-md-6 value"><& /Elements/SingleUserRoleInput, role => $role, Ticket => $Ticket &></div>
 </div>
 
diff --git a/share/html/Ticket/Elements/EditPeopleInline b/share/html/Ticket/Elements/EditPeopleInline
index 620a01870..11905054a 100644
--- a/share/html/Ticket/Elements/EditPeopleInline
+++ b/share/html/Ticket/Elements/EditPeopleInline
@@ -57,7 +57,10 @@
 % $single_roles->LimitToSingleValue;
 % while (my $role = $single_roles->Next) {
 <tr>
-  <td class="label"><% $role->Name %>:</td>
+  <td class="label"><% $role->Name %>:
+%   if ( my $hint = $role->EntryHint ) {
+        <span class="far fa-question-circle icon-helper" data-toggle="tooltip" data-placement="top" data-original-title="<% $hint %>"></span>
+%   }
   <td class="value"><& /Elements/SingleUserRoleInput, role => $role, Ticket => $Ticket &></td>
 </tr>
 

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


More information about the rt-commit mailing list