Line # Revision Author
1 8 ahitrov@rambler.ru <%args>
2
3 225 ahitrov $name => undef
4 $SETS => undef
5 $object => undef
6 8 ahitrov@rambler.ru
7 </%args>
8 <%init>
9
10 return undef if (! ref($SETS));
11 return undef if (! $name);
12
13 my $FIELDS = {};
14 225 ahitrov for my $element (%{ $SETS }) {
15 8 ahitrov@rambler.ru if ($element =~ /^${name}_(\d+)\.selectrusname$/)
16 {
17 $FIELDS->{$name.'_'.$1} = {} if (! exists($FIELDS->{$name.'_'.$1}));
18 $FIELDS->{$name.'_'.$1}->{rusname} = $m->comp('/contenido/components/filter.msn', str => $SETS->{$element} );
19 } elsif ($element =~ /^${name}_(\d+)\.selectdata$/)
20 {
21 my $lvalues = $m->comp('/contenido/components/filter.msn', str => $SETS->{$element});
22 $FIELDS->{$name.'_'.$1} = {} if (! exists($FIELDS->{$name.'_'.$1}));
23 my @values = split(/[\n\r]+/, $lvalues);
24
25 $FIELDS->{$name.'_'.$1}->{values} = \@values;
26 }
27 }
28 225 ahitrov return $object->_serialize($FIELDS);
29 8 ahitrov@rambler.ru
30 </%init>