[Rt-commit] rt branch 5.0/adjust-ticket-create-subject-spacing created. rt-5.0.2-282-gd59fc161eb
BPS Git Server
git at git.bestpractical.com
Tue Jul 5 16:32:05 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/adjust-ticket-create-subject-spacing has been created
at d59fc161eb3c609ac31ce90c4c4077a25a1e6b76 (commit)
- Log -----------------------------------------------------------------
commit d59fc161eb3c609ac31ce90c4c4077a25a1e6b76
Author: Brian Conry <bconry at bestpractical.com>
Date: Tue Jul 5 09:24:06 2022 -0500
Tweak spacing on ticket create/update with gnupg_widget
On the Ticket Create page the Subject is the last item in the "Create a
new ticket in ..." group before the option to include an article (if
present), but when $gnupg_widget is set there is a pair of checkboxes
displayed after the Subject.
The additional spacing after the Subject inputs, due to the "form-group"
class on the containing <div>, makes the checkboxes look like they're
closely related to the "Include Article" input when it is present, but
they are not.
A similar issue existed on the Ticket Update page, but in this case the
UI was inconsistent in that the encryption checkboxes were located above
the Subject textbox. They have been moved to be below the Subject in
addition to fixing the spacing inconsistency.
This change detects when $gnupg_widget is set and adjusts the location
of the "form-group" class appropriately to make the spacing align better
with the logical grouping of the controls.
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index 11080f71c4..a0d5a6c35d 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -207,11 +207,12 @@
ForCreation => 1,
&>
+% my $subject_is_last = !$gnupg_widget;
<div class="form-row">
-<div class="form-group label col-2">
+<div class="<% $subject_is_last ? 'form-group ' : '' %>label col-2">
<&|/l&>Subject</&>:
</div>
-<div class="form-group value col-9">
+<div class="<% $subject_is_last ? 'form-group ' : '' %>value col-9">
<input class="form-control" type="text" name="Subject" maxsize="200" value="<%$ARGS{Subject} || ''%>" />
% $m->callback( %ARGS, CallbackName => 'AfterSubject' );
</div>
@@ -219,8 +220,8 @@
% if ( $gnupg_widget ) {
<div class="form-row">
- <div class="label col-2 empty"></div>
- <div class="value col-9"><& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &></div>
+ <div class="form-group label col-2 empty"></div>
+ <div class="form-group value col-9"><& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &></div>
</div>
% }
% if ( RT->Config->Get('ArticleOnTicketCreate')) {
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 315cb9838d..17804b10a3 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -152,10 +152,21 @@
<& /Ticket/Elements/UpdateCc, %ARGS, TicketObj => $TicketObj &>
+% my $subject_is_last = !$gnupg_widget;
+<div class="form-row">
+ <div class="<% $subject_is_last ? 'form-group ' : '' %>label col-2">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="<% $subject_is_last ? 'form-group ' : '' %>value col-9">
+ <input class="form-control" type="text" name="UpdateSubject" value="<% $ARGS{UpdateSubject} || $TicketObj->Subject || '' %>" />
+% $m->callback( %ARGS, CallbackName => 'AfterSubject' );
+ </div>
+</div>
+
% if ( $gnupg_widget ) {
<div class="form-row">
- <div class="label col-2 empty"></div>
- <div class="value col-9">
+ <div class="form-group label col-2 empty"></div>
+ <div class="form-group value col-9">
<& /Elements/Crypt/SignEncryptWidget,
self => $gnupg_widget,
TicketObj => $TicketObj,
@@ -165,15 +176,6 @@
% }
% $m->callback( %ARGS, CallbackName => 'AfterGnuPG' );
-<div class="form-row">
- <div class="form-group label col-2">
- <&|/l&>Subject</&>:
- </div>
- <div class="value col-9">
- <input class="form-control" type="text" name="UpdateSubject" value="<% $ARGS{UpdateSubject} || $TicketObj->Subject || '' %>" />
-% $m->callback( %ARGS, CallbackName => 'AfterSubject' );
- </div>
-</div>
<& /Articles/Elements/BeforeMessageBox, %ARGS &>
<div class="form-group">
<div class="messagebox-container action-<% $type %>">
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list