%#============================================================================
%# ePortal - WEB Based daily organizer
%# Author - S.Rusakov <rusakov_sa@users.sourceforge.net>
%#
%# 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 &>
&nbsp;
<% $dlg->dialog_start( title => pick_lang(rus => "Органайзер", eng => "Organizer") ) %>

  <% $dlg->field('title') %>
  <% $dlg->field('private', RO => 1) %>

<% $dlg->row('<hr width="50%">') %>
  <% $dlg->field('uid', RO => 1) %>
% my %opt = !$obj->Private && $obj->xacl_check_admin ? () : (RO => 1);
  <% $dlg->field('xacl_read', %opt) %>
  <% $dlg->field('xacl_write', %opt) %>
  <% $dlg->field('xacl_admin', %opt) %>
<% $dlg->buttons %>
<% $dlg->dialog_end %>
<p>


%#=== @metags once =========================================================
<%once>
my ($dlg, $obj);
</%once>


%#=== @METAGS cleanup =========================================================
<%cleanup>
($dlg, $obj) = ();
</%cleanup>

%#=== @METAGS attr =========================================================
<%attr>
Title => {rus => "Органайзер", eng => "Organizer"}
Layout => 'Dialog'
</%attr>


%#=== @METAGS onStartRequest ====================================================
<%method onStartRequest>
<& PARENT:onStartRequest, %ARGS &>
<%perl>
  $obj = new ePortal::App::Organizer::Organizer;

  # Handle Dialog events
  $dlg = new ePortal::HTML::Dialog( obj => $obj, width => 450);
  my $location = try {
    $dlg->handle_request( );
  } catch ePortal::Exception::DataNotValid with {
    my $E = shift;
    $session{ErrorMessage} = $E->text;
    '';
  };
  return $location if $location;

</%perl></%method>

