1 |
8 |
ahitrov@rambler.ru |
<form action="<% $INVITE->{$proto}->[1] %>" method="GET" name="formnew"> |
2 |
|
|
<div align="right"> |
3 |
|
|
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="tform"> |
4 |
|
|
<tr><td><% $INVITE->{$proto}->[0] %></td> |
5 |
|
|
|
6 |
|
|
% my $classes = [ '' => '--- Выберите тип ---' ]; |
7 |
|
|
% |
8 |
|
|
% foreach my $class (sort {$a->class_name cmp $b->class_name} $proto eq 'documents' ? @{ $user->get_available_classes } : @{ $state->{'available_'.$proto} }) |
9 |
|
|
% { |
10 |
|
|
% my $object = $class->new($keeper); |
11 |
|
|
% push @$classes, $class, "".$object->class_name()." ($class)"; |
12 |
|
|
% } |
13 |
|
|
|
14 |
|
|
<td width="100%"> |
15 |
|
|
<& "/contenido/components/select.msn", name=>'class', values=>$classes, check=>$default, style=>'width:100%;' &> |
16 |
|
|
</td> |
17 |
|
|
<td><input type="submit" value="Создать"></td> |
18 |
|
|
<td><input type="hidden" name="sect_id" value="<% $sect_id %>"></td> |
19 |
|
|
</tr></table> |
20 |
|
|
|
21 |
|
|
</div></form> |
22 |
|
|
<%ONCE> |
23 |
|
|
use locale; |
24 |
|
|
</%ONCE> |
25 |
|
|
<%ARGS> |
26 |
|
|
|
27 |
|
|
$default => undef |
28 |
|
|
$proto => 'documents' |
29 |
|
|
$sect_id => 1 |
30 |
|
|
|
31 |
|
|
</%ARGS> |
32 |
|
|
<%INIT> |
33 |
|
|
my $INVITE = { |
34 |
|
|
'documents' => ['Новый документ','document.html'], |
35 |
|
|
'sections' => ['Новая секция','section.html'], |
36 |
|
|
'links' => ['Новая связь','link.html'], |
37 |
|
|
'users' => ['Новый пользователь','users.html'], |
38 |
|
|
}; |
39 |
|
|
</%INIT> |