[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0alpha1-92-gc0d50734a6
? sunnavy
sunnavy at bestpractical.com
Thu Apr 9 09:35:52 EDT 2020
The branch, 5.0-trunk has been updated
via c0d50734a65d59ae3879166b84ecde5159db8f43 (commit)
via d12942f0a1266a14743d7a55a88d23ec57ad7027 (commit)
from 07f207984ba101627ca6b25792a0cc4b2221bd18 (commit)
Summary of changes:
share/html/Elements/SingleUserRoleInput | 2 --
share/html/Ticket/Elements/EditBasics | 7 ++++++-
share/html/Ticket/Elements/EditPeople | 12 ++++++++++--
share/html/Ticket/Elements/EditPeopleInline | 11 +++++++++--
4 files changed, 25 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit d12942f0a1266a14743d7a55a88d23ec57ad7027
Author: michel <michel at bestpractical.com>
Date: Tue Mar 17 18:54:34 2020 +0100
Display custom role hints as tooltips
This makes it consistent with hints for other fields.
diff --git a/share/html/Elements/SingleUserRoleInput b/share/html/Elements/SingleUserRoleInput
index fdb8fff735..d628b2f6ca 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",
@@ -73,6 +72,5 @@ $Size => undef
$Default => undef
$User => undef
$Ticket => undef
-$ShowEntryHint => 1
$ShowPlaceholder => 1
</%ARGS>
diff --git a/share/html/Ticket/Elements/EditBasics b/share/html/Ticket/Elements/EditBasics
index 5578474ac9..16040d6e34 100644
--- a/share/html/Ticket/Elements/EditBasics
+++ b/share/html/Ticket/Elements/EditBasics
@@ -150,6 +150,7 @@ unless ($ExcludeCustomRoles) {
while (my $role = $roles->Next) {
push @role_fields, {
name => $role->Name,
+ hint => $role->EntryHint,
comp => '/Elements/SingleUserRoleInput',
args => {
role => $role,
@@ -185,7 +186,11 @@ for my $field (@fields) {
% for my $field (@fields) {
%# Prefer input name as css class, e.g. "FinalPriority" instead of "Final_Priority"
<div class="form-row <% CSSClass( $field->{args}{Name} || $field->{'name'} ) %>">
- <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 7899187d4e..40971b4cc1 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>
@@ -139,7 +143,11 @@
<div class="col-md-3 label">
<div class="custom-control custom-checkbox">
<input type="checkbox" id="delete-<% $role->id %>-checkbox" class="checkbox custom-control-input" onclick="setCheckbox(this, /^Ticket-DeleteWatcher-Type-RT::CustomRole-<% $role->Id %>-/)">
- <label class="custom-control-label" for="delete-<% $role->id %>-checkbox"><% $role->Name %>:</label>
+ <label class="custom-control-label" for="delete-<% $role->id %>-checkbox"><% $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>
+% }
+ </label>
</div>
</div>
<div class="col-md-6 value"><& EditWatchers, TicketObj => $Ticket, Watchers => $group &></div>
diff --git a/share/html/Ticket/Elements/EditPeopleInline b/share/html/Ticket/Elements/EditPeopleInline
index 620a018708..52983377a1 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>
@@ -90,7 +93,11 @@
% my $group = $Ticket->RoleGroup($role->GroupType);
% if ($group->Id && $group->MembersObj->Count) {
<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>
<td class="value"><& EditWatchers, TicketObj => $Ticket, Watchers => $group &></td>
</tr>
% }
commit c0d50734a65d59ae3879166b84ecde5159db8f43
Merge: 07f207984b d12942f0a1
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Apr 9 21:27:46 2020 +0800
Merge branch '5.0/display-custom-role-hint' into 5.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list