%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2000-2004 Sergey Rusakov. All rights reserved. %# This program is open source software %# %# %#----------------------------------------------------------------------------   <&| /dialog.mc:edit_dialog, title => pick_lang(rus => "Группа ресурсов", eng => "Group"), obj => $obj, focus => 'title', width => 550 &> <& /dialog.mc:hidden, id => 'recordtype', value => 'group' &> <& /dialog.mc:field, id => 'parent_id' &> <& /dialog.mc:field, id => 'title' &> %# %# OTHER ============================================================ %# <&| /dialog.mc:collapse, collapse => 0, title => pick_lang(rus => "Дополнительные свойства", eng => "More info") &> <& /dialog.mc:field, id => 'nickname' &> <& /dialog.mc:field, id => 'priority' &> <& /dialog.mc:field, id => 'hidden' &> <&| /dialog.mc:cell, -align=>'center' &> <% pick_lang({rus => "Краткое описание", eng => "Short description"}) %>:
<& /dialog.mc:textarea, id => 'memo' &> %# %# Access rights ============================================================ %# % if ($obj->xacl_check_admin) { <&| /dialog.mc:collapse, title => pick_lang(rus => "Права доступа", eng => "Access rights") &> <& /dialog.mc:read_only, id => 'uid' &> <& /dialog.mc:field, id => 'xacl_read' &> <& /dialog.mc:field, id => 'xacl_write' &> <& /dialog.mc:field, id => 'xacl_admin' &> <& /dialog.mc:field, id => 'including_children' &> % } <&| /dialog.mc:cell &>  <& /dialog.mc:buttons, ok_label => pick_lang(rus => "Сохранить ресурс", eng => "Save the resource"), apply_button => 1 &>

%#=== @METAGS attr ========================================================= <%attr> Title => {rus => "Группа", eng => "Group"} %#=== @METAGS onStartRequest ==================================================== <%method onStartRequest><%perl> $obj = new ePortal::Catalog; $obj->add_attribute( including_children => { type => 'Temp', dtype => 'YesNo', label => pick_lang(rus => "Заменить права подчиненных", eng => "Replace rights on children"), }); $m->comp('/dialog.mc:handle_request', obj => $obj, callback_aftersave => sub { my $obj = shift; $obj->xacl_set_r if $obj-> including_children; }); #initialize ACL my $parent = $obj->parent; $obj->set_acl_from_obj($parent) if $parent and ! $obj->check_id; %#=== @metags once ========================================================= <%once> my ($obj); %#=== @metags cleanup ========================================================= <%cleanup> ($obj) = ();