[Rt-commit] r10086 - in rt/branches/3.7-EXPERIMENTAL: . html/Elements/GnuPG

ruz at bestpractical.com ruz at bestpractical.com
Mon Dec 24 18:49:31 EST 2007


Author: ruz
Date: Mon Dec 24 18:49:30 2007
New Revision: 10086

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SignEncryptWidget
   rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html
   rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html

Log:
 r9886 at cubic-pc (orig r9885):  ruz | 2007-12-11 17:17:28 +0300
 * more on integrating things into SignEncryptWidget


Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SignEncryptWidget
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SignEncryptWidget	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/GnuPG/SignEncryptWidget	Mon Dec 24 18:49:30 2007
@@ -52,17 +52,20 @@
 
 <%METHOD Process>
 <%ARGS>
-$QueueObj
-$Arguments => {}
+$self => undef
+$QueueObj => undef
+$TicketObj => undef
 </%ARGS>
 <%INIT>
-return unless RT->Config->Get('GnuPG')->{'Enable'};
+return unless $self;
+
+$QueueObj ||= $TicketObj->QueueObj if $TicketObj;
 
 foreach ( qw(Sign Encrypt) ) {
-    $Arguments->{ $_ } = $m->comp( '/Widgets/Form/Boolean:Process',
+    $self->{ $_ } = $m->comp( '/Widgets/Form/Boolean:Process',
         Name => $_,
         DefaultValue => $QueueObj->$_,
-        Arguments => $Arguments,
+        Arguments => $self,
     );
 }
 </%INIT>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Create.html	Mon Dec 24 18:49:30 2007
@@ -261,13 +261,6 @@
     ARGSRef => \%ARGS
 );
 
-if ( RT->Config->Get('GnuPG')->{'Enable'} ) {
-    $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
-        QueueObj => $QueueObj,
-        Arguments => \%ARGS,
-    );
-}
-
 # if no due date has been set explicitly, then use the
 # queue's default if it exists
 if ($QueueObj->DefaultDueIn && !$ARGS{'Due'}) {
@@ -313,6 +306,11 @@
 my $checks_failure = 0;
 
 my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS );
+$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
+    self      => $gnupg_widget,
+    QueueObj  => $QueueObj,
+);
+
 
 if ( !exists $ARGS{'AddMoreAttach'} && ($ARGS{'id'}||'') eq 'new' ) {
     my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',

Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html	Mon Dec 24 18:49:30 2007
@@ -180,13 +180,6 @@
     $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject);
 }
 
-if ( RT->Config->Get('GnuPG')->{'Enable'} ) {
-    $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
-        QueueObj => $TicketObj->QueueObj,
-        Arguments => \%ARGS,
-    );
-}
-
 # Things needed in the template - we'll do the processing here, just
 # for the convenience:
 
@@ -247,7 +240,10 @@
 my @results;
 
 my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS );
-
+$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
+    self => $gnupg_widget,
+    TicketObj => $TicketObj,
+);
 if ( $ARGS{'SubmitTicket'} ) {
     my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',
         self      => $gnupg_widget,


More information about the Rt-commit mailing list