[Rt-commit] rt branch, 4.4/sig-move, created. rt-4.4.0-83-gd0f25d8

Rachel Kelly rachel at bestpractical.com
Wed May 4 17:24:20 EDT 2016


The branch, 4.4/sig-move has been created
        at  d0f25d83ebbfdbb3723bd5d111acd9e50ec6ecc9 (commit)

- Log -----------------------------------------------------------------
commit d0f25d83ebbfdbb3723bd5d111acd9e50ec6ecc9
Author: Rachel Kelly <rachel at bestpractical.com>
Date:   Tue May 3 22:30:34 2016 +0000

    Add signature-above-quote option
    
    Add button to optionally place signature in ticket reply at top
    or bottom so that the user can decide. Default behavior places
    signature at bottom.  Add pod doc for description of behavior.
    Add conditional within html element.
    
    Fixes: I#31877

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 6852ff2..283e88b 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2474,6 +2474,16 @@ minutes.  Note that this only effects entry, not display.
 
 Set($DefaultTimeUnitsToHours, 0);
 
+=item C<$SignatureAboveQuote>
+
+Use this to set the placement of the signature.  By default this
+setting places the signature at the bottom of the quoted text.  Set
+this to no to place the signature above the quoted text.
+
+=cut
+
+Set($SignatureAboveQuote, 0);
+
 =item C<$TimeInICal>
 
 By default, events in the iCal feed on the ticket search page
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 2aad19c..93a981e 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -319,6 +319,15 @@ our %META;
         WidgetArguments => {
             Description => 'Enter time in hours by default', #loc
             Hints       => 'Only for entry, not display', #loc
+        },    
+    },
+    SignatureAboveQuote => {
+        Section         => 'Ticket composition', #loc
+        Overridable     => 1,
+        SortOrder       => 10,
+        Widget          => '/Widgets/Form/Boolean',
+        WidgetArguments => {
+            Description => 'Place signature above quote', #loc
         },
     },
     SearchResultsRefreshInterval => {
diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index b61f1e7..5d7d3cc 100644
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -48,7 +48,13 @@
 <textarea autocomplete="off" class="messagebox <% $Type eq 'text/html' ? 'richtext' : '' %>" <% $width_attr %>="<% $Width %>" rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>">\
 % $m->comp('/Articles/Elements/IncludeArticle', %ARGS) if $IncludeArticle;
 % $m->callback( %ARGS, SignatureRef => \$signature, DefaultRef => \$Default, MessageRef => $message );
+% if (RT->Config->Get("SignatureAboveQuote", $session{'CurrentUser'})) {
+<% $Default || '' %><%$signature %><% $message %><% '' %></textarea>
+% }
+% else {
 <% $Default || '' %><% $message %><% $signature %></textarea>
+% }
+
 % $m->callback( %ARGS, CallbackName => 'AfterTextArea' );
 
 % if (!$SuppressAttachmentWarning) {

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


More information about the rt-commit mailing list