[Rt-commit] rt branch, admin_ui, updated. daf7cfbf0436813290bcea43272336919196d72d
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Dec 29 01:54:53 EST 2009
The branch, admin_ui has been updated
via daf7cfbf0436813290bcea43272336919196d72d (commit)
from 16861a70711b089824b15f7ab7b399e9a57ae9ec (commit)
Summary of changes:
lib/RT/Action/CreateQueue.pm | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
create mode 100644 lib/RT/Action/CreateQueue.pm
- Log -----------------------------------------------------------------
commit daf7cfbf0436813290bcea43272336919196d72d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Dec 29 14:54:12 2009 +0800
add CreateQueue action
diff --git a/lib/RT/Action/CreateQueue.pm b/lib/RT/Action/CreateQueue.pm
new file mode 100644
index 0000000..75e9cf6
--- /dev/null
+++ b/lib/RT/Action/CreateQueue.pm
@@ -0,0 +1,39 @@
+package RT::Action::CreateQueue;
+use strict;
+use warnings;
+
+use base qw/Jifty::Action::Record::Create/;
+
+sub record_class { 'RT::Model::Queue' }
+
+use constant report_detailed_messages => 1;
+
+sub arguments {
+ my $self = shift;
+
+ my $args = $self->SUPER::arguments();
+ for (qw/sign encrypt/) {
+ $args->{$_} = {
+ default_value => 0,
+ render_as => 'checkbox',
+ label => _($_),
+ };
+ }
+ return $args;
+}
+
+=head2 take_action
+
+=cut
+
+sub take_action {
+ my $self = shift;
+ $self->SUPER::take_action;
+ for (qw/sign encrypt/) {
+ my $method = "set_$_";
+ $self->record->$method( $self->argument_value($_) );
+ }
+ return 1;
+}
+
+1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list