Ignore:
Timestamp:
05/23/09 07:01:57 (15 years ago)
Author:
nanardon
Message:
  • add checkbox type field
File:
1 edited

Legend:

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

    r165 r167  
    3838    st => [ 'État (US)' ], 
    3939    sutype => [ 'Structure admin.', 'select-N:sutype' ], 
     40    exported => [ undef, 'checkbox' ], 
    4041}; 
    4142 
     
    7374            title 
    7475            expire 
     76            exported 
    7577        ) ], 
    7678    }, 
     
    9597        attrs => [ qw( 
    9698            gidNumber description 
    97             sutype 
     99            sutype exported 
    98100        ) ], 
    99101    }, 
     
    202204            return $html; 
    203205        }; 
     206        /^checkbox$/ and do { 
     207            return sprintf('<input type="checkbox" name="%s"%s>', 
     208                $attr, 
     209                $self->attr_raw_value($attr) ? '  checked="yes"' : '' 
     210            ); 
     211        }; 
    204212        /^select(-\w+)?:([^:]+)(?::(.*))?$/ and do { 
    205213            my $options = $1 || ''; 
Note: See TracChangeset for help on using the changeset viewer.