%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2000-2003 Sergey Rusakov. All rights reserved. %# This program is free software; you can redistribute it %# and/or modify it under the same terms as Perl itself. %# %# %#---------------------------------------------------------------------------- <& /message.mc &>   <% $dlg->dialog_start( title => pick_lang(rus => "Носитель", eng => "Medium") ) %> % foreach my $field (qw/archive_id title memo/) { <% $dlg->field($field) %> % } <% $dlg->buttons %> <% $dlg->dialog_end %>

%#=== @metags once ========================================================= <%once> my ($dlg, $obj); %#=== @METAGS cleanup ========================================================= <%cleanup> ($dlg, $obj) = (); %#=== @METAGS attr ========================================================= <%attr> Title => {rus => "Продукт", eng => "Product"} %#=== @METAGS onStartRequest ==================================================== <%method onStartRequest><%perl> $obj = new ePortal::App::Diskoteka::Product; # Handle Dialog events $dlg = new ePortal::HTML::Dialog( obj => $obj, width => 500); my $location = try { $dlg->handle_request( ); } catch ePortal::Exception::DataNotValid with { my $E = shift; $session{ErrorMessage} = $E->text; ''; }; if ( $dlg->isButtonPressed('ok') ) { my $medium = new ePortal::App::Diskoteka::Medium; $medium->restore_where(product_id => $obj->id); while($medium->restore_next) { $medium->archive_id( $obj->archive_id ); $medium->update; } } return $location;