Revision 3 (by ahitrov@rambler.ru, 2010/03/24 15:19:32) |
The CORE
|
<form action="<% $INVITE->{$proto}->[1] %>" method="GET" name="formnew">
<div align="right">
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="tform">
<tr><td><% $INVITE->{$proto}->[0] %></td>
% my $classes = [ '' => '--- �������� ��� ---' ];
%
% foreach my $class (sort {$a->class_name cmp $b->class_name} $proto eq 'documents' ? @{ $user->get_available_classes } : @{ $state->{'available_'.$proto} })
% {
% my $object = $class->new($keeper);
% push @$classes, $class, "".$object->class_name()." ($class)";
% }
<td width="100%">
<& "/contenido/components/select.msn", name=>'class', values=>$classes, check=>$default, style=>'width:100%;', onChange => "set_create_button(this, 'create_$btn_id')" &>
</td>
<td><input id="create_<% $btn_id %>" type="submit" value="�������"<% $default ? '' : ' disabled="disabled"' %>></td>
<td><input type="hidden" name="sect_id" value="<% $sect_id %>"></td>
</tr></table>
</div></form>
<%ONCE>
use locale;
</%ONCE>
<%ARGS>
$default => undef
$proto => 'documents'
$sect_id => 1
</%ARGS>
<%INIT>
my $INVITE = {
'documents' => ['����� ��������','document.html'],
'sections' => ['����� ������','section.html'],
'links' => ['����� �����','link.html'],
'users' => ['����� ������������','users.html'],
};
my $btn_id = int(rand(10000));
</%INIT>