Ignore:
Timestamp:
04/27/12 11:34:19 (12 years ago)
Author:
nanardon
Message:
  • allow to use Attributes object w/o description from base
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r939 r949  
    258258    my ($self, $attr, $type) = @_; 
    259259 
     260    my $attr_info = $type 
     261        ? { formtype => $type } 
     262        : undef; 
     263 
    260264    my $attribute = ($self->{object} 
    261265        ? $self->{object}->attribute($attr) 
    262         : $self->base->attribute($self->otype, $attr)) or return; 
     266        : $self->base->attribute($self->otype, $attr)); 
     267 
     268    $attribute ||= $self->base->attribute( 
     269        $self->otype, 
     270        {  
     271            name => $attr, 
     272            formtype => $type 
     273        }, 
     274    ); 
    263275 
    264276    my $htmlname = $self->escape($self->attr_field_name($attr)); 
Note: See TracChangeset for help on using the changeset viewer.