- Timestamp:
- 09/15/12 08:52:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm
r1107 r1135 46 46 47 47 sub displayattr : Local { 48 my ($self, $c, $otype ) = @_;49 my $attribute = $c->model('Accounts')->db->attribute($otype,50 $c->req->param('attr')) or return;48 my ($self, $c, $otype, $attr) = @_; 49 $attr ||= $c->req->param('attr'); 50 my $attribute = $c->model('Accounts')->db->attribute($otype, $attr) or return; 51 51 $c->stash->{value} = $attribute->display($c->req->param('id')); 52 52 } … … 56 56 57 57 my $base = $c->model('Accounts')->db; 58 my $val = $c->req->param('val'); 59 $c->stash->{'complete'} = $c->prototype->auto_complete_result([ 58 my $val = $c->req->param('val') || ''; 59 $c->stash->{values} = [ 60 sort 60 61 grep { /^\Q$val\E/ } $base->attributes_summary($otype, $attr) 61 ] );62 ]; 62 63 63 64 }
Note: See TracChangeset
for help on using the changeset viewer.