Changeset 221 for trunk/lib


Ignore:
Timestamp:
04/20/09 03:24:26 (15 years ago)
Author:
nanardon
Message:
  • add a select build from voting list on ballot
Location:
trunk/lib/Vote/Controller
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/Controller/Admin.pm

    r217 r221  
    7474                map { $_ => ($c->req->param($_) || undef) } 
    7575                grep { exists($c->req->params->{$_}) } 
    76                 qw(label description start end choice_count free_choice elected_count) 
     76                qw(label description start end choice_count free_choice elected_count elected_choice) 
    7777            ) and $poll->commit; 
    7878        } elsif ($c->req->param('encrypted')) { 
  • trunk/lib/Vote/Controller/Ballot.pm

    r219 r221  
    8484        lc($_) 
    8585    } ($c->req->param('fsbal')) ]; 
     86    $c->stash->{esbal} = [ grep { $_ } $c->req->param('esbal') ]; 
     87 
    8688    $c->request->parameters->{fsbal} = $c->stash->{fsbal}; 
    8789 
    8890    my @sbalval = grep { $_ } map { lc($choices{$_} || '') } $c->req->param('sbal'); 
    8991 
    90     my @ballot = grep { $_ } (@sbalval, @{$c->stash->{fsbal} || []}); 
     92    my @ballot = grep { $_ } ( 
     93        @sbalval, 
     94        @{$c->stash->{fsbal} || []}, 
     95        @{$c->stash->{esbal} || []}, 
     96    ); 
    9197    if (scalar(@ballot) > $poll->info('choice_count')) { 
    9298        $c->req->parameters->{'ballot'} = ''; 
Note: See TracChangeset for help on using the changeset viewer.