[Bps-public-commit] App-Changeloggr branch, master, updated. 01a54cc4b4fe2569fd46d92fd6a16e91f1848cff
Alex M Vandiver
alexmv at bestpractical.com
Tue Mar 31 16:31:36 EDT 2009
The branch, master has been updated
via 01a54cc4b4fe2569fd46d92fd6a16e91f1848cff (commit)
from 9dadcc930bc4e24d752c219f00bf390470a21623 (commit)
Summary of changes:
lib/App/Changeloggr/View.pm | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 01a54cc4b4fe2569fd46d92fd6a16e91f1848cff
Author: Alex Vandiver <alexmv at mit.edu>
Date: Tue Mar 31 16:29:04 2009 -0400
Make voting make use of the region
Creating actions using App::Action::Thingy->new doesn't register them
with Jifty->web, which later pain. Thus, we switch the shorter (and
more correct) new_action helper.
diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 1566db1..ddbd119 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -111,12 +111,16 @@ sub show_change {
sub show_vote_form {
my $change = shift;
-
form {
- my $vote = App::Changeloggr::Action::CreateVote->new(
- arguments => { change => $change->id } );
+ my $vote = new_action(
+ class => "CreateVote",
+ arguments => { change => $change->id }
+ );
render_action $vote ;
- form_submit( label => 'Vote' );
+ form_submit(
+ label => 'Vote',
+ onclick => { submit => $vote, refresh_self => 1 }
+ );
}
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list