Ignore:
Timestamp:
08/31/09 17:11:21 (15 years ago)
Author:
nanardon
Message:
  • attributes needing to have uniq value are now check online, showing img on field change
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm

    r272 r407  
    5656} 
    5757 
     58sub objattrexist : Local { 
     59    my ($self, $c, $otype, $attr) = @_; 
     60    my $base = $c->model('Accounts')->db; 
     61    my $val = $c->req->param('val'); 
     62    my @obj = $base->search_objects($otype, "$attr=$val"); 
     63 
     64    if (my $filter = $c->req->param('exclude')) { 
     65        @obj = grep { $_ ne $filter } @obj; 
     66    } 
     67    $c->stash->{'exists'} = join(', ', @obj); 
     68} 
     69 
    5870sub end : Private { 
    5971    my ( $self, $c ) = @_; 
Note: See TracChangeset for help on using the changeset viewer.