[Rt-commit] rt branch, 4.6/selfservice-checkout-attachmemt-layout-fix, created. rt-4.4.4-544-gc99025cad0

Aaron Trevena ast at bestpractical.com
Thu Apr 16 05:11:20 EDT 2020


The branch, 4.6/selfservice-checkout-attachmemt-layout-fix has been created
        at  c99025cad0d086bebdd928a76c5ac78d324a7d89 (commit)

- Log -----------------------------------------------------------------
commit 8417d0e22a26b54e030cbf57116ce5eb74b1c11d
Author: Aaron Trevena <ast at bestpractical.com>
Date:   Thu Apr 16 10:08:20 2020 +0100

    Render attachment box below message box in self-service
    
    Make self-service ticket create page consistent with privileged create page,
    and update test

diff --git a/share/html/SelfService/Create.html b/share/html/SelfService/Create.html
index 44eb920d51..54a458f288 100644
--- a/share/html/SelfService/Create.html
+++ b/share/html/SelfService/Create.html
@@ -98,11 +98,13 @@
     InTable         => 1,
     ForCreation     => 1,
     &>
-<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $queue_obj &>
 </div>
-<&|/l&>Describe the issue below</&>:<br />
-<& /Elements/MessageBox, Default => $ARGS{Content} || ''  &>
-
+<div class="form-group">
+  <& /Elements/MessageBox, Default => $ARGS{Content} || ''  &>
+</div>
+<div class="form-group">
+  <& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $queue_obj &>
+</div>
 <div class="form-row">
   <div class="col-md-12">
     <& /Elements/Submit, Label => loc("Create ticket")&>
diff --git a/share/html/SelfService/Update.html b/share/html/SelfService/Update.html
index fe49a680f2..1efad2fe68 100644
--- a/share/html/SelfService/Update.html
+++ b/share/html/SelfService/Update.html
@@ -80,9 +80,9 @@
         </div>
 
     </div>
-    <& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $Ticket &>
     <& /Elements/EditCustomFields, Object => $Ticket &>
 </div>
+<div class="form-group">
 % if (exists $ARGS{UpdateContent}) {
 % # preserve QuoteTransaction so we can use it to set up sane references/in/reply to
 % my $temp = $ARGS{'QuoteTransaction'};
@@ -93,10 +93,16 @@
 % my $IncludeSignature = 1;
 <& /Elements/MessageBox, Name=>"UpdateContent", IncludeSignature => $IncludeSignature, %ARGS &>
 % }
-    <br />
-
+</div>
+<div class="form-group">
+  <& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $Ticket &>
+</div>
 
+<div class="form-row">
+  <div class="col-md-12">
 <& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket', id => 'SubmitTicket' &>
+  </div>
+</div>
 
   </&>
   </form>
diff --git a/t/web/csrf.t b/t/web/csrf.t
index bdd895d92d..9071a32b36 100644
--- a/t/web/csrf.t
+++ b/t/web/csrf.t
@@ -223,6 +223,5 @@ $m->content_lacks("Possible cross-site request forgery");
 is($m->response->redirects, 0, "no redirection");
 like($m->response->request->uri, qr{^http://[^/]+\Q/SelfService/Create.html\E\?CSRF_Token=\w+$});
 $m->title_is('Create a ticket in #1');
-$m->content_contains('Describe the issue below:');
 
 done_testing;

commit c99025cad0d086bebdd928a76c5ac78d324a7d89
Author: Aaron Trevena <ast at bestpractical.com>
Date:   Thu Apr 16 10:10:04 2020 +0100

    Center align fields in self-service ticket forms
    
    Make self-service ticket create page consistent with privileged create page.

diff --git a/share/html/SelfService/Create.html b/share/html/SelfService/Create.html
index 54a458f288..9d1748f2c0 100644
--- a/share/html/SelfService/Create.html
+++ b/share/html/SelfService/Create.html
@@ -51,43 +51,43 @@
 <form action="Create.html" method="post" enctype="multipart/form-data" name="TicketCreate">
 <input type="hidden" class="hidden" name="id" value="new" />
 <input type="hidden" class="hidden" name="Token" value="<% $ARGS{'Token'} %>" />
+<input type="hidden" class="hidden" name="Queue" value="<%$queue_obj->id || ''%>" />
 % for my $key (grep {defined $ARGS{$_}} map {+("new-$_", "$_-new")} keys %RT::Link::DIRMAP) {
 <input type="hidden" class="hidden" name="<% $key %>" value="<% $ARGS{$key} %>" />
 % }
 
 <&|/Widgets/TitleBox, title => $title, class => 'ticket-info-basics' &>
 <div>
-<div class="form-row">
-<div class="label col-md-3">
+<div class="queue form-row">
+<div class="label col-md-2">
 <&|/l&>Queue</&>:
 </div>
-<div class="value col-md-9">
-    <input type="hidden" class="hidden" name="Queue" value="<%$queue_obj->id || ''%>" />
-    <strong><%$queue_obj->Name || ''%></strong> <% $queue_obj->Description ? '('.$queue_obj->Description.')' : '' %>
+<div class="value col-md-8">
+    <span class="current-value form-control"><strong><%$queue_obj->Name || ''%></strong> <% $queue_obj->Description ? '('.$queue_obj->Description.')' : '' %></span>
 </div>
 </div>
 <% $m->callback( CallbackName => 'AfterQueue', %ARGS, QueueObj => $queue_obj ) %>
 <div class="form-row">
-<div class="label col-md-3">
+<div class="form-group label col-md-2">
 <&|/l&>Requestors</&>:
 </div>
-<div class="value col-md-9">
+<div class="value col-md-8">
 <& /Elements/EmailInput, Name => 'Requestors', Size => '20', Default => $ARGS{Requestors} || $session{CurrentUser}->EmailAddress, AutocompleteMultiple => 1 &>
 </div>
 </div>
 <div class="form-row">
-<div class="label col-md-3">
+<div class="form-group label col-md-2">
 <&|/l&>Cc</&>:
 </div>
-<div class="value col-md-9">
+<div class="value col-md-8">
 <& /Elements/EmailInput, Name => 'Cc', Size => '20', Default => $ARGS{Cc} || '', AutocompleteMultiple => 1 &>
 </div>
 </div>
 <div class="form-row">
-<div class="label col-md-3">
+<div class="form-group label col-md-2">
 <&|/l&>Subject</&>:
 </div>
-<div class="value col-md-9">
+<div class="form-group value col-md-8">
 <input class="form-control" type="text" name="Subject" size="60" maxsize="200" value="<%$ARGS{Subject} || ''%>" />
 </div>
 </div>
diff --git a/share/html/SelfService/Update.html b/share/html/SelfService/Update.html
index 1efad2fe68..0af72a33a3 100644
--- a/share/html/SelfService/Update.html
+++ b/share/html/SelfService/Update.html
@@ -61,10 +61,10 @@
 
 <div>
     <div class="form-row">
-        <div class="label col-md-3">
+        <div class="label col-md-2">
             <&|/l&>Status</&>
         </div>
-        <div class="value col-md-9">
+        <div class="value col-md-8">
             <& /Ticket/Elements/SelectStatus,
                Name => "Status",
                TicketObj => $Ticket,
@@ -72,10 +72,10 @@
         </div>
     </div>
     <div class="form-row">
-        <div class="label col-md-3">
+        <div class="form-group label col-md-2">
             <&|/l&>Subject</&>
         </div>
-        <div class="value col-md-9">
+        <div class="form-group value col-md-8">
             <input class="form-control" type="text" name="UpdateSubject" size="60" value="<% $ARGS{UpdateSubject} || $Ticket->Subject || '' %>" />
         </div>
 
@@ -87,7 +87,7 @@
 % # preserve QuoteTransaction so we can use it to set up sane references/in/reply to
 % my $temp = $ARGS{'QuoteTransaction'};
 % delete $ARGS{'QuoteTransaction'};
-<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS&>
+<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS &>
 % $ARGS{'QuoteTransaction'} = $temp;
 % } else {
 % my $IncludeSignature = 1;

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


More information about the rt-commit mailing list