Changeset 790


Ignore:
Timestamp:
02/03/10 17:43:13 (14 years ago)
Author:
nanardon
Message:
  • show date for locked account (show content)
File:
1 edited

Legend:

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

    r781 r790  
    3939    sutype => [ 'Structure admin.', 'select-N:sutype' ], 
    4040    exported => [ 'Propagé', 'label' ], 
    41     locked => [ 'Vérouillé', 'checkbox' ], 
     41    locked => [ 'Vérouillé', 'checkbox:l' ], 
    4242    isMainAddress => [ 'Adresse principale', 'checkbox' ], 
    4343    site => [ 'Site', 'select-N:site' ], 
     
    260260            return $html; 
    261261        }; 
    262         /^checkbox$/ and do { 
    263             return sprintf('<input type="checkbox" name="%s"%s>', 
     262        /^checkbox(?::(\w+))$/ and do { 
     263            my $options = $1; 
     264            my $text = sprintf('<input type="checkbox" name="%s"%s>', 
    264265                $self->escape($htmlname), 
    265266                $self->attr_raw_value($attr) ? '  checked="yes"' : '' 
    266             ) . sprintf('<input type="hidden" name="%s">', 
     267            );  
     268            $text .= sprintf('<input type="hidden" name="%s">', 
    267269                $self->escape($htmlname)); 
     270            if ($options =~ /l/) { 
     271                $text .= $self->attr_raw_value($attr) 
     272                    ? ' ' . $self->attr_raw_value($attr) 
     273                    : '';  
     274            } 
     275            return $text; 
    268276        }; 
    269277        /^select(-\w+)?:([^:\/]+)(?:\/([^:]+))?(?::(.*))?/ and do { 
Note: See TracChangeset for help on using the changeset viewer.