[+] Добавить значение <%args> $name => undef $rusname => undef $check => undef $object => undef <%init> return unless ref $object; my $fields = ref $object->$name ? $object->$name : $object->get_image($name); $fields = [] unless $fields && ref $fields eq 'ARRAY'; $m->out(''); $m->out(''); $m->out(''); $m->out(''); $m->out(''); my $i = 1; foreach my $field (@$fields) { my $rusname = "$rusname N$i"; $m->comp('.field', name => $name, fname => $field->{name}, value => $field->{value}, number => $i); $i++; } $rusname = "$rusname N$i"; for (1..5) { $m->comp('.field', name => $name, fname => '', value => '', number => $i++); } $m->out('
#
Параметр:
Значение:
'); <%def .field> <%args> $name => undef $fname => undef $value => undef $number => undef <%init> $value =~ s/&/&/g;