[Rt-commit] r10072 - in rt/branches/3.7-EXPERIMENTAL: .

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


Author: ruz
Date: Mon Dec 24 18:47:17 2007
New Revision: 10072

Added:
   rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectKeyForSigning
Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)

Log:
 r9824 at cubic-pc (orig r9823):  ruz | 2007-12-05 21:35:44 +0300
 * add SelectKeyForSigning selector


Added: rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectKeyForSigning
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectKeyForSigning	Mon Dec 24 18:47:17 2007
@@ -0,0 +1,23 @@
+<select name="<% $Name %>">
+% while ( my ($address, $keys) = splice @res, 0, 2 ) {
+% foreach my $key ( @$keys ) {
+<option value="<% $key->{'Key'} %>"><% $address %></option>
+% } }
+</select>
+<%ARGS>
+$Name => 'SignUsing',
+ at Addresses => ();
+</%ARGS>
+<%INIT>
+return unless RT->Config->Get('GnuPG')->{'Enable'};
+
+my @res;
+
+my %seen;
+foreach my $address ( grep $_ && !$seen{ lc $_ }++, @Addresses ) {
+    $RT::Logger->crit( $address );
+    my %keys = RT::Crypt::GnuPG::GetKeysForSigning( $address );
+    next unless $keys{'info'};
+    push @res, $address, $keys{'info'};
+}
+</%INIT>


More information about the Rt-commit mailing list