[Rt-commit] rt branch 5.0/fix-labeled-value-layout created. rt-5.0.3-150-ga311b35c5d
BPS Git Server
git at git.bestpractical.com
Mon Nov 7 14:48:41 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/fix-labeled-value-layout has been created
at a311b35c5d43aa62cf0204355c4dab35f742a3fd (commit)
- Log -----------------------------------------------------------------
commit a311b35c5d43aa62cf0204355c4dab35f742a3fd
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Nov 7 21:51:56 2022 +0800
Revert back LabeledValue changes to role inputs
Current LabeledValue always adds label/value classes, which caused
alignment issues to role inputs. As the label col is also an input, it's
not quite appropriate to use LabeledValue there.
diff --git a/share/html/Asset/Elements/AddCatalogPeople b/share/html/Asset/Elements/AddCatalogPeople
index 476684017c..50d549ed04 100644
--- a/share/html/Asset/Elements/AddCatalogPeople
+++ b/share/html/Asset/Elements/AddCatalogPeople
@@ -50,24 +50,34 @@ $Object
</%args>
<div class="add-user">
<h3><&|/l&>Add a person</&></h3>
- <&| /Elements/LabeledValue, RawLabel => $m->scomp('SelectRoleType', Object => $Object, Name => "AddUserRoleMember-Role") &>
+ <div class="form-row">
+ <div class="col-3">
+ <& SelectRoleType, Object => $Object, Name => "AddUserRoleMember-Role" &>
+ </div>
+ <div class="col-9">
<input type="text" name="AddUserRoleMember"
data-autocomplete="Users"
data-autocomplete-return="Name"
placeholder="<% loc("Find a user...") %>"
class="form-control"
>
- </&>
+ </div>
+ </div>
</div>
<div class="add-group">
<h3><&|/l&>Add a group</&></h3>
- <&| /Elements/LabeledValue, RawLabel => $m->scomp('SelectRoleType', Object => $Object, Name => "AddGroupRoleMember-Role") &>
+ <div class="form-row">
+ <div class="col-3">
+ <& SelectRoleType, Object => $Object, Name => "AddGroupRoleMember-Role" &>
+ </div>
+ <div class="col-9">
<input type="text" name="AddGroupRoleMember"
data-autocomplete="Groups"
data-autocomplete-return="Name"
placeholder="<% loc("Find a group...") %>"
class="form-control"
>
- </&>
+ </div>
+ </div>
</div>
diff --git a/share/html/Ticket/Elements/AddWatchers b/share/html/Ticket/Elements/AddWatchers
index 8bc64a974f..19b375ad47 100644
--- a/share/html/Ticket/Elements/AddWatchers
+++ b/share/html/Ticket/Elements/AddWatchers
@@ -53,49 +53,89 @@
% }
% if ($Users and $Users->Count) {
- <& /Elements/LabeledValue, Label => loc("Type"), Value => loc("Username") &>
-
+ <div class="form-row">
+ <div class="col-3">
+ <&|/l&>Type</&>
+ </div>
+ <div class="col-9">
+ <&|/l&>Username</&>
+ </div>
+ </div>
% while (my $u = $Users->Next ) {
- <&| /Elements/LabeledValue, RawLabel => $m->scomp("/Elements/SelectWatcherType",
+ <div class="form-row">
+ <div class="col-3">
+ <&/Elements/SelectWatcherType,
Name => "Ticket-AddWatcher-Principal-". $u->PrincipalId,
- Queue => $Ticket->QueueObj),
- ValueSpanClass => "current-value"
+ Queue => $Ticket->QueueObj,
&>
- <& '/Elements/ShowUser', User => $u, style=>'verbose' &>
- </&>
+ </div>
+ <div class="col-9">
+ <span class="form-control current-value">
+ <& '/Elements/ShowUser', User => $u, style=>'verbose' &>
+ </span>
+ </div>
+ </div>
% }
% }
% if ($Groups and $Groups->Count) {
- <& /Elements/LabeledValue, Label => loc("Type"), Value => loc("Group") &>
+ <div class="form-row">
+ <div class="col-3">
+ <&|/l&>Type</&>
+ </div>
+ <div class="col-9">
+ <&|/l&>Group</&>
+ </div>
+ </div>
% while (my $g = $Groups->Next ) {
- <&| /Elements/LabeledValue, RawLabel => $m->scomp("/Elements/SelectWatcherType",
+ <div class="form-row">
+ <div class="col-3">
+ <& /Elements/SelectWatcherType,
Name => "Ticket-AddWatcher-Principal-".$g->PrincipalId,
- Queue => $Ticket->QueueObj),
- ValueSpanClass => "current-value"
+ Queue => $Ticket->QueueObj,
&>
+ </div>
+ <div class="col-9">
+ <span class="form-control current-value">
<%$g->Name%> (<%$g->Description%>)
- </&>
+ </span>
+ </div>
+ </div>
% }
% }
- <& /Elements/LabeledValue, Label => loc("Type"), Value => loc("User or Group") &>
-
+ <div class="form-row">
+ <div class="col-3">
+ <&|/l&>Type</&>
+ </div>
+ <div class="col-9">
+ <&|/l&>User or Group</&>
+ </div>
+ </div>
% my $counter = 4;
% for my $email (@extras) {
% $counter++;
- <&| /Elements/LabeledValue,
- RawLabel => $m->scomp('/Elements/SelectWatcherType', Name => "WatcherTypeEmail".$counter, Queue => $Ticket->QueueObj),
- ValueSpanClass => 'current-value' &>
+ <div class="form-row">
+ <div class="col-3">
+ <&/Elements/SelectWatcherType, Name => "WatcherTypeEmail".$counter, Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-9">
<input type="hidden" name="WatcherAddressEmail<%$counter%>" value="<%$email->format%>">
- <%$email->format%>
- </&>
+ <span class="form-control current-value">
+ <%$email->format%>
+ </span>
+ </div>
+ </div>
% }
% for my $i (1 .. 3) {
- <&| /Elements/LabeledValue,
- RawLabel => $m->scomp('/Elements/SelectWatcherType', Name => "WatcherTypeEmail".$i, Queue => $Ticket->QueueObj) &>
+ <div class="form-row">
+ <div class="col-3">
+ <&/Elements/SelectWatcherType, Name => "WatcherTypeEmail" . $i, Queue => $Ticket->QueueObj &>
+ </div>
+ <div class="col-6">
<& /Elements/EmailInput, Name => 'WatcherAddressEmail' . $i, Size => '20', AutocompleteType => 'Principals' &>
- </&>
+ </div>
+ </div>
% }
<%INIT>
commit 35fb318ff8deef4a6b79af765df2f954fc1823b7
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Nov 7 21:28:12 2022 +0800
Add back the unintentionally deleted closing div of col-6
It was removed during LabeledValue refactor by accident.
diff --git a/share/html/Elements/BulkLinks b/share/html/Elements/BulkLinks
index 330934239a..47388f6393 100644
--- a/share/html/Elements/BulkLinks
+++ b/share/html/Elements/BulkLinks
@@ -93,6 +93,7 @@
<&| /Elements/LabeledValue, Label => '' &>
<i><&|/l&>(Check box to delete)</&></i>
</&>
+</div>
<div class="col-6">
<h3><&|/l&>New Links</&></h3>
commit 984dfc428200ac4d1636e572ae00363125b03a44
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Oct 6 21:48:32 2022 +0800
Re-add the missing Creator row for article display
It was removed during LabeledValue refactor by accident.
diff --git a/share/html/Articles/Article/Display.html b/share/html/Articles/Article/Display.html
index 8b4a96d4a6..f15534ab47 100644
--- a/share/html/Articles/Article/Display.html
+++ b/share/html/Articles/Article/Display.html
@@ -53,7 +53,10 @@
<& /Elements/LabeledValue, Label => loc('Summary'), ValueSpanClass => 'current-value', Value => $article->Summary &>
<& /Elements/LabeledValue, Label => loc('Sort Order'), ValueSpanClass => 'current-value', Value => $article->SortOrder &>
<& /Elements/LabeledValue, Label => loc('Class'), ValueSpanClass => 'current-value', Value => $article->ClassObj->Name &>
-<& /Elements/LabeledValue, Label => loc('Creator'), ValueSpanClass => 'current-value', Value => $article->CreatedObj->AsString &>
+<&| /Elements/LabeledValue, Label => loc('Creator'), ValueSpanClass => 'current-value' &>
+ <& /Elements/ShowUser, User => $article->CreatorObj &>
+</&>
+<& /Elements/LabeledValue, Label => loc('Created'), ValueSpanClass => 'current-value', Value => $article->CreatedObj->AsString &>
<& /Elements/LabeledValue, Label => loc('Updated'), ValueSpanClass => 'current-value', Value => $article->LastUpdatedObj->AsString &>
</&>
commit e5da928babe022a7528240c62e35b5acf2c71a93
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Oct 6 21:23:27 2022 +0800
Add back the missing current-value span
Otherwise, rows in asset widget on ticket create page would have
alignment issues.
diff --git a/share/html/Elements/ShowRecord b/share/html/Elements/ShowRecord
index 594367226c..976ab525a3 100644
--- a/share/html/Elements/ShowRecord
+++ b/share/html/Elements/ShowRecord
@@ -81,6 +81,7 @@ for my $column (@columns) {
</%perl>
<&| /Elements/LabeledValue,
RawLabel => loc($title),
+ ValueSpanClass => 'current-value',
Class => 'record-field '.
( $Class ? CSSClass("$Class-field")." " : "" ) .
CSSClass($fetch_columnmap->($attr,'attribute',[$attr],'no_escape'))
commit 4078ce50e9eb05bb47ab901b0701f24f276cfb60
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Oct 6 18:21:33 2022 +0800
Use LabledValue to generate current-value spans
diff --git a/share/html/Articles/Article/Elements/EditBasics b/share/html/Articles/Article/Elements/EditBasics
index 4f5046a092..53624d62b2 100644
--- a/share/html/Articles/Article/Elements/EditBasics
+++ b/share/html/Articles/Article/Elements/EditBasics
@@ -65,14 +65,14 @@
</&>
% if ($ARGS{'id'} ne 'new') {
- <&| /Elements/LabeledValue, Label => loc('Creator') &>
- <span class="current-value form-control"><& /Elements/ShowUser, User => $ArticleObj->CreatorObj &></span>
+ <&| /Elements/LabeledValue, Label => loc('Creator'), ValueSpanClass => 'current-value from-control' &>
+ <& /Elements/ShowUser, User => $ArticleObj->CreatorObj &>
</&>
- <&| /Elements/LabeledValue, Label => loc('Created') &>
- <span class="current-value form-control"><%$ArticleObj->CreatedObj->AsString%></span>
+ <&| /Elements/LabeledValue, Label => loc('Created'), ValueSpanClass => 'current-value from-control' &>
+ <%$ArticleObj->CreatedObj->AsString%>
</&>
- <&| /Elements/LabeledValue, Label => loc('Updated') &>
- <span class="current-value form-control"><%$ArticleObj->LastUpdatedObj->AsString%></span>
+ <&| /Elements/LabeledValue, Label => loc('Updated'), ValueSpanClass => 'current-value from-control' &>
+ <%$ArticleObj->LastUpdatedObj->AsString%>
</&>
% }
% if ($ARGS{'id'} eq 'new' || $ArticleObj->CurrentUserHasRight('DisableArticle')) {
commit 3ebc69a718d7638c990defe95f98982095385ce3
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Oct 6 17:21:08 2022 +0800
Remove unnecessary current-value span
The current-value span is used in forms to align the label/value, so
it's not needed when rows are not in forms.
diff --git a/share/html/Admin/Actions/Elements/ShowBasics b/share/html/Admin/Actions/Elements/ShowBasics
index 75bbf76607..75a30e7add 100644
--- a/share/html/Admin/Actions/Elements/ShowBasics
+++ b/share/html/Admin/Actions/Elements/ShowBasics
@@ -46,16 +46,16 @@
%#
%# END BPS TAGGED BLOCK }}}
<&| /Elements/LabeledValue, Label => loc("Name") &>
- <span class="current-value"><% $ARGS{"Name"} || $Action->Name || '' %></span>
+ <% $ARGS{"Name"} || $Action->Name || '' %>
</&>
<&| /Elements/LabeledValue, Label => loc("Description") &>
- <span class="current-value"><% $ARGS{"Description"} || $Action->Description || '' %></span>
+ <% $ARGS{"Description"} || $Action->Description || '' %>
</&>
<&| /Elements/LabeledValue, Label => loc("Action Module") &>
- <span class="current-value"><% $ARGS{"ExecModule"} || $Action->ExecModule || ''%></span>
+ <% $ARGS{"ExecModule"} || $Action->ExecModule || ''%>
</&>
<&| /Elements/LabeledValue, Label => loc("Parameters to Pass") &>
- <span class="current-value"><% $ARGS{"Argument"} || $Action->Argument || '' %></span>
+ <% $ARGS{"Argument"} || $Action->Argument || '' %>
</&>
<%ARGS>
commit 91713996bbe2dcf63a26e2cbf109e1df6e362682
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Oct 6 16:22:39 2022 +0800
Fix layout of ticket graph page
The LabeledValue refactor dropped a couple of div opening tags and a css
class by accident, this commit adds them back.
diff --git a/share/html/Ticket/Graphs/Elements/EditGraphProperties b/share/html/Ticket/Graphs/Elements/EditGraphProperties
index f15b7dd787..794240a3e6 100644
--- a/share/html/Ticket/Graphs/Elements/EditGraphProperties
+++ b/share/html/Ticket/Graphs/Elements/EditGraphProperties
@@ -73,8 +73,8 @@
</select>
</&>
- <&| /Elements/LabeledValue, Label => loc('Show as well') &>
-
+ <&| /Elements/LabeledValue, Label => loc('Show as well'), ValueSpanClass => 'current-value' &>
+ <div class="form-row">
% foreach my $type ( @link_types ) {
% my $checked = '';
% $checked = 'checked="checked"' if grep $type eq $_, @ShowLinks;
@@ -172,13 +172,14 @@ my $id = "graph-properties-box-$Level";
my $class = '';
$class = 'class="hidden"' if $Level != 1 && !@Default;
</%INIT>
- <&| /Elements/LabeledValue, Label => loc('Show Tickets Properties on [_1] level', $Level) &>
+ <&| /Elements/LabeledValue, Label => loc('Show Tickets Properties on [_1] level', $Level), ValueSpanClass => 'current-value' &>
(<small><a href="#" onclick="hideshow(<% $id |n,j%>); return false;"><% loc('open/close') %></a></small>):
</&>
<div id="<% $id %>" <% $class |n %>>
% while ( my ($group, $list) = (splice @Available, 0, 2) ) {
- <&| /Elements/LabeledValue, Label => loc($group) &>
+ <&| /Elements/LabeledValue, Label => loc($group), ValueSpanClass => 'current-value' &>
+ <div class="form-row">
% foreach my $prop ( @$list ) {
% my $checked = '';
% $checked = 'checked="checked"' if grep $_ eq $prop, @Default;
commit 07d0bfd5bfaf158f1b1dc5b4c0da9133afe04ff5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Oct 4 22:15:42 2022 +0800
Drop an extra form-row wrapper as LabeledValue already has one
diff --git a/share/html/Asset/Search/Bulk.html b/share/html/Asset/Search/Bulk.html
index 43b716296d..ad3cd5520a 100644
--- a/share/html/Asset/Search/Bulk.html
+++ b/share/html/Asset/Search/Bulk.html
@@ -90,12 +90,10 @@
<&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics asset-bulk-basics", title_class => "inverse" &>
<div class="form-row">
<div class="col-6">
- <div class="form-row">
- <&| /Elements/LabeledValue, Label => loc('Catalog') &>
- <& /Asset/Elements/SelectCatalog, Name => 'UpdateCatalog', UpdateSession => 0, ShowNullOption => 1 &>
- </&>
-
-
+ <&| /Elements/LabeledValue, Label => loc('Catalog') &>
+ <& /Asset/Elements/SelectCatalog, Name => 'UpdateCatalog', UpdateSession => 0, ShowNullOption => 1 &>
+ </&>
+ </div>
<div class="col-6">
<&| /Elements/LabeledValue, Label => loc('Name') &>
<input class="form-control" type="text" name="UpdateName" value="<% $ARGS{'Name'}||'' %>" size="40">
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list