[Rt-commit] rt branch, admin_ui, updated. 031fecc68cdd640b244aa81f5cc643d7ce6e5b2f
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Dec 30 02:36:54 EST 2009
The branch, admin_ui has been updated
via 031fecc68cdd640b244aa81f5cc643d7ce6e5b2f (commit)
from 1ad2b302ca99c80b1fec78c37612770367176a56 (commit)
Summary of changes:
lib/RT/Action/UpdateQueue.pm | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
- Log -----------------------------------------------------------------
commit 031fecc68cdd640b244aa81f5cc643d7ce6e5b2f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Dec 30 15:36:45 2009 +0800
refactor UpdateQueue action to use schema
diff --git a/lib/RT/Action/UpdateQueue.pm b/lib/RT/Action/UpdateQueue.pm
index 9e2f804..65ce770 100644
--- a/lib/RT/Action/UpdateQueue.pm
+++ b/lib/RT/Action/UpdateQueue.pm
@@ -8,32 +8,16 @@ 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 => $self->record->$_,
- render_as => 'checkbox',
- label => _($_),
- };
- }
- return $args;
-}
+use Jifty::Param::Schema;
+use Jifty::Action schema {
+ param sign =>
+ render as 'Checkbox';
+ param encrypt =>
+ render as 'Checkbox',
+};
=head2 take_action
=cut
-sub take_action {
- my $self = shift;
- for (qw/sign encrypt/) {
- my $method = "set_$_";
- $self->record->$method( $self->argument_value($_) );
- }
- $self->SUPER::take_action;
- return 1;
-}
-
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list