[Rt-commit] rt branch, admin_ui, updated. 1ad2b302ca99c80b1fec78c37612770367176a56
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Dec 30 01:58:35 EST 2009
The branch, admin_ui has been updated
via 1ad2b302ca99c80b1fec78c37612770367176a56 (commit)
from 9292c3d888674327501604a14b44cb6ff7c15c5c (commit)
Summary of changes:
lib/RT/Action/CreateQueue.pm | 36 ++++++++----------------------------
1 files changed, 8 insertions(+), 28 deletions(-)
- Log -----------------------------------------------------------------
commit 1ad2b302ca99c80b1fec78c37612770367176a56
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 30 14:58:23 2009 +0800
refactor CreateQueue action to use schema
diff --git a/lib/RT/Action/CreateQueue.pm b/lib/RT/Action/CreateQueue.pm
index 75e9cf6..312e78f 100644
--- a/lib/RT/Action/CreateQueue.pm
+++ b/lib/RT/Action/CreateQueue.pm
@@ -2,38 +2,18 @@ package RT::Action::CreateQueue;
use strict;
use warnings;
-use base qw/Jifty::Action::Record::Create/;
+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;
-}
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+ param sign =>
+ render as 'Checkbox';
+ param encrypt =>
+ render as 'Checkbox',
+};
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list