[Rt-commit] r9885 - in rt/branches/3.7-RTIR-RELENG/html: Ticket
ruz at bestpractical.com
ruz at bestpractical.com
Tue Dec 11 09:17:30 EST 2007
Author: ruz
Date: Tue Dec 11 09:17:28 2007
New Revision: 9885
Modified:
rt/branches/3.7-RTIR-RELENG/html/Elements/GnuPG/SignEncryptWidget
rt/branches/3.7-RTIR-RELENG/html/Ticket/Create.html
rt/branches/3.7-RTIR-RELENG/html/Ticket/Update.html
Log:
* more on integrating things into SignEncryptWidget
Modified: rt/branches/3.7-RTIR-RELENG/html/Elements/GnuPG/SignEncryptWidget
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/html/Elements/GnuPG/SignEncryptWidget (original)
+++ rt/branches/3.7-RTIR-RELENG/html/Elements/GnuPG/SignEncryptWidget Tue Dec 11 09:17:28 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-RTIR-RELENG/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/html/Ticket/Create.html (original)
+++ rt/branches/3.7-RTIR-RELENG/html/Ticket/Create.html Tue Dec 11 09:17:28 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-RTIR-RELENG/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/html/Ticket/Update.html (original)
+++ rt/branches/3.7-RTIR-RELENG/html/Ticket/Update.html Tue Dec 11 09:17:28 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