- Timestamp:
- 05/21/09 01:09:14 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r148 r151 19 19 uidNumber => [ 'UID' ], 20 20 gidNumber => [ 'GID', 'select:group:gidNumber' ], 21 manager => [ 'Responsable', 'select-N:user:uid' ], 21 22 sn => [ 'Nom' ], 22 23 givenName => [ 'Prénom' ], … … 30 31 postalCode => [ 'Code postal' ], 31 32 postOfficeBox => [ 'BP' ], 32 department => [ 'Département' ],33 department => [ 'Département', 'select-N:department' ], 33 34 streetAddress => [ 'Rue', 'textarea' ], 34 35 st => [ 'Etat' ], … … 64 65 attrs => [ qw( 65 66 company 67 manager 66 68 department 67 69 title … … 80 82 cell => { 81 83 name => 'Cellule', 82 attrs => [qw(description ) ],84 attrs => [qw(description manager) ], 83 85 }, 84 86 department => { 85 87 name => 'Département', 86 attrs => [qw(description ) ],88 attrs => [qw(description manager) ], 87 89 }, 88 90 team => { … … 178 180 $self->attr_raw_value($attr) 179 181 ); 180 /^select:([^:]+):(.*)$/ and do { 181 my $otype = $1; 182 my $keyfield = $2; 182 /^select(-\w+)?:([^:]+)(?::(.*))?$/ and do { 183 my $options = $1 || ''; 184 my $otype = $2; 185 my $keyfield = $3; 183 186 my $select = sprintf('<select name="%s">', 184 187 $self->escape($attr)) . "\n"; 185 my $value = $self->attr_raw_value($attr); 188 $select .= '<option value="">--</option>' . "\n" if ($options =~ /N/); 189 my $value = $self->attr_raw_value($attr) || ''; 186 190 foreach my $id ($self->base->list_objects($otype)) { 187 191 my $obj = $self->base->get_object($otype, $id) or next;
Note: See TracChangeset
for help on using the changeset viewer.