[Rt-commit] rt branch, 4.2-on-4.0/message-box-include-signature-before-quote, created. rt-4.0.7-89-g4ee66aa

? sunnavy sunnavy at bestpractical.com
Fri Oct 12 10:41:03 EDT 2012


The branch, 4.2-on-4.0/message-box-include-signature-before-quote has been created
        at  4ee66aa44b932c5d406789cdd1f33eb39263e035 (commit)

- Log -----------------------------------------------------------------
commit f332f0552de7feb66a949f6bd7d4027386010393
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Oct 12 21:41:59 2012 +0800

    added config MessageBoxIncludeSignatureBeforeQuote

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 6532aed..161df5b 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1500,6 +1500,16 @@ C<$MessageBoxIncludeSignature>.
 
 Set($MessageBoxIncludeSignatureOnComment, 1);
 
+=item C<$MessageBoxIncludeSignatureBeforeQuote>
+
+Should your users' signatures (from their Preferences page) be
+included before quoted text
+
+=cut
+
+Set($MessageBoxIncludeSignatureBeforeQuote, 0);
+
+
 =back
 
 
diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index 69227bf..f2df967 100755
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -48,7 +48,7 @@
 <textarea autocomplete="off" class="messagebox" <% $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 );
-<% $Default || '' %><% $message %><% $signature %></textarea>
+<% $Default || '' %><% RT->Config->Get('MessageBoxIncludeSignatureBeforeQuote') ? ( $signature . ( $message =~ /\S/ ? "\n$message" : $message ) ) : ( $message . $signature ) %></textarea>
 % $m->callback( %ARGS, CallbackName => 'AfterTextArea' );
 <%INIT>
 

commit 4ee66aa44b932c5d406789cdd1f33eb39263e035
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Oct 12 21:52:10 2012 +0800

    allow user to customize MessageBoxIncludeSignatureBeforeQuote in pref

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index ba338bb..e57c35d 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -271,6 +271,15 @@ our %META = (
             Hints => "When the WYSIWYG editor is not enabled, this setting determines whether automatic line wraps in the ticket message box are sent to RT or not.",              # loc
         },
     },
+    MessageBoxIncludeSignatureBeforeQuote => {
+        Section         => 'Ticket composition', #loc
+        Overridable     => 1,
+        SortOrder       => 8.2,
+        Widget          => '/Widgets/Form/Boolean',
+        WidgetArguments => {
+            Description => 'Message box includes signature before quote', #loc
+        },
+    },
     DefaultTimeUnitsToHours => {
         Section         => 'Ticket composition', #loc
         Overridable     => 1,
diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index f2df967..477d7c4 100755
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -48,7 +48,7 @@
 <textarea autocomplete="off" class="messagebox" <% $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 );
-<% $Default || '' %><% RT->Config->Get('MessageBoxIncludeSignatureBeforeQuote') ? ( $signature . ( $message =~ /\S/ ? "\n$message" : $message ) ) : ( $message . $signature ) %></textarea>
+<% $Default || '' %><% RT->Config->Get('MessageBoxIncludeSignatureBeforeQuote', $session{CurrentUser}) ? ( $signature . ( $message =~ /\S/ ? "\n$message" : $message ) ) : ( $message . $signature ) %></textarea>
 % $m->callback( %ARGS, CallbackName => 'AfterTextArea' );
 <%INIT>
 

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


More information about the Rt-commit mailing list