%args>
$name => undef
$rusname => undef
$check => undef
%args>
<%init>
my $fields;
eval { $fields = eval('use vars qw($VAR1); '.$check) };
$fields = [] unless $fields;
$m->out('
Список полей:
');
$m->out('');
my $i = 1;
foreach my $field (@$fields) {
my $rusname = "$rusname N$i";
$m->comp('.field',
name => $name,
fname => $field->{name},
url => $field->{url},
alias => $field->{alias},
image => $field->{image},
amage => $field->{amage},
delete => 1,
number => $i);
$i++;
}
$rusname = "$rusname N$i";
$m->comp('.field', name => $name, fname => '', url => '', alias => '', delete => 0, number => $i);
$m->out('
');
%init>
<%def .field>
<%args>
$name => undef
$fname => undef
$url => undef
$alias => undef
$image => undef
$amage => undef
$delete => 0
$number => undef
%args>
<%init>
%init>
%def>