[Rt-commit] rt branch 5.0/adjust-ticket-create-subject-spacing created. rt-5.0.2-282-g4e002a74ad

BPS Git Server git at git.bestpractical.com
Tue Jul 5 15:28:44 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  4e002a74ad047ebc6e8bce70c895391e03397bab (commit)

- Log -----------------------------------------------------------------
commit 4e002a74ad047ebc6e8bce70c895391e03397bab
Author: Brian Conry <bconry at bestpractical.com>
Date:   Tue Jul 5 09:24:06 2022 -0500

    Tweak spacing on ticket create 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.
    
    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')) {

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list