<screens>

 <use-perl-module>ACIS::Web::NewUser</use-perl-module>
 <use-perl-module>ACIS::Web::User</use-perl-module>
 <use-perl-module>ACIS::Web::Admin</use-perl-module>
 <use-perl-module>ACIS::Web::LogOff</use-perl-module>
 <use-perl-module>ACIS::Web::Affiliations</use-perl-module>

<!--  common system screens -->
 
 <screen id='index'>

   <process>
      <call function='ACIS::Web::User::normal_login' />      
   </process>

   <presentation type='xslt' filename='index.xsl' />
 </screen>

<!--  user screens -->

  <screen id='welcome'>

    <call function='ACIS::Web::load_session_or_authenticate' />
    <call function='ACIS::Web::User::check_session_type' />

    <presentation type='xslt' filename='user/welcome.xsl' />

  </screen>
  
  <screen id='forgotten-password'>
    
    <process>
      <call function='ACIS::Web::forgotten_password' />
    </process>

    <presentation type='xslt' filename='general/forgotten-password.xsl' />
  </screen>
  
  <screen id='photo'>

    <call function='ACIS::Web::load_session_or_authenticate' />
    <call function='ACIS::Web::User::check_session_type' />
    <call function='ACIS::Web::User::upload_photo' />
    
    <presentation type='xslt' filename='user/photo.xsl' /> 
  </screen>
  
  <screen id='personal-data'>
    <param name='full-name'       required='yes' type='name'      place='record:full-name'/>
    <param name='first-name'      required='yes' type='name'      place='record:name/first'/>
    <param name='middle-name'                    type='name'      place='record:name/middle'/>
    <param name='last-name'       required='yes' type='name'      place='record:name/last'/>
    <param name='name-variations' required='yes' type='printable' place='record:name-variations'/>
    <param name='email'           required='yes' type='simpleemail'     place='record:email'/>
    <param name='mail-pub'        type='printable'                place='record:mail-pub'/>
    <param name='homepage'        type='url'                      place='record:homepage'/>
    <param name='phone'           type='printable'                place='record:phone'/>
    <param name='postal'          type='printable'                place='record:postal'/>

    <call function='ACIS::Web::load_session_or_authenticate' />
    <call function='ACIS::Web::User::check_session_type' />

    <init>
      <call function='ACIS::Web::prepare_form_data' />
      <call function='ACIS::Web::User::personal_data_init'/>
    </init>
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::process_form_data' />
      <call function='ACIS::Web::User::personal_data' />
    </process>
    
    <presentation type='xslt' filename='user/personal-data.xsl' />
  </screen>

  <screen id='affiliation'>
    <param name='handle' type='printable'/>
    <param name='name'   type='printable'/>
    <param name='action'      type='printable' required='yes' />
    <param name='search-by'   type='printable'/>
    <param name='search-what' type='printable'/>
    
    <call function='ACIS::Web::load_session_or_authenticate' />
    
    <init>
     <call function='ACIS::Web::Affiliations::prepare'/>
     <call function='ACIS::Web::Affiliations::make_it_visible'/>
    </init>
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::Affiliations::general_handler'/>
    </process>
    
    <presentation type='xslt' filename='user/affiliation.xsl' />
  </screen>
  
  <screen id='new-institution'>

    <param name='name'     type='name' required='yes' />
    <param name='name-english' type='name' />
    <param name='location' type='name' required='yes' />
    <param name='homepage' type='url'  required='yes' />
    <param name='email'    type='simpleemail'     />

    <param name='postal'   type='printable' />
    <param name='phone'    type='printable' />
    <param name='fax'      type='printable' />
    <param name='handle'   type='printable' />
    <param name='note'     type='printable' />

    <param name='add-institution'/>

    <call function='ACIS::Web::load_session_or_authenticate' />
    <call function='ACIS::Web::User::check_session_type' />
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::Affiliations::submit_institution' />
    </process>
    
    <presentation type='xslt' filename='general/submit-new-institution.xsl' />
  </screen>
  
  <screen id='sci-fields'>
    <param name='sci-fields' type='printable' place='record:sci-fields'/>
    
    <call function='ACIS::Web::load_session_or_authenticate' />
    <call function='ACIS::Web::User::check_session_type' />
    
    <init>
      <call function='ACIS::Web::prepare_form_data' />
    </init>
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::process_form_data' />
      <call function='ACIS::Web::User::sci_fields' />
    </process>
   
    <presentation type='xslt' filename='user/sci-fields.xsl' />
  </screen>
  
  <screen id='unregister'>

    <call function='ACIS::Web::load_session_or_authenticate' />
    <call function='ACIS::Web::User::check_session_type' />

    <process>
      <call function='ACIS::Web::User::unregister' />
    </process>
    
    <presentation type='xslt' filename='user/unregister.xsl' />

 </screen>

 <screen id='profile-overview'>
 
   <call function='ACIS::Web::load_session' />
   <call function='ACIS::Web::Affiliations::prepare'/>

   <call function='ACIS::Web::User::profile_overview'/>
   
   <presentation type='xslt' filename='user/current-state-of-profile.xsl' />
  </screen>

  
  <screen id='off'>

    <call function='ACIS::Web::load_session' />
    <call function='ACIS::Web::User::check_session_type' />
    <call function='ACIS::Web::LogOff::user_normal_logoff' />
    
    <presentation type='xslt' filename='user/good-bye.xsl' />
  </screen>


<!--  new user registration screens -->

  <screen id='new-user'>
    <param name='email'        required='yes' type='simpleemail'     place='record:email,owner:login'/>
    <param name='mail-pub'                                     place='record:mail-pub'/>
    <param name='first-name'   required='yes' type='name'      place='record:name/first'/>
    <param name='middle-name'                 type='name'      place='record:name/middle'/>
    <param name='last-name'    required='yes' type='name'      place='record:name/last'/>
    <param name='year'         required='yes' type='integer'   place='session:registration-date/year' />
    <param name='month'        required='yes' type='integer'   place='session:registration-date/month'/>
    <param name='day'          required='yes' type='integer'   place='session:registration-date/day'  />
    <param name='pass'         required='yes' type='password'  place='owner:password'/>
    <param name='pass-confirm' required='yes' type='password'  />
    <param name='homepage'                    type='url'       place='record:homepage'/>

    <init>
      <call function='ACIS::Web::NewUser::initial_prepare' />
    </init>
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::NewUser::initial_process' />
    </process>
    
    <presentation type='xslt' filename='new-user/initial.xsl' />
  </screen>
  
  <screen id='new-user/additional'>
    <param name='name-latin'      type='latinname'             place='record:name/latin' />
    <param name='name-variations' required='yes'   type='printable'  />
    <param name='sci-fields'                                   place='record:sci-fields'/>


    <call function='ACIS::Web::load_session' />

    <init>
      <call function='ACIS::Web::prepare_form_data' />
      <call function='ACIS::Web::NewUser::additional_prepare' />
    </init>
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::process_form_data' />
      <call function='ACIS::Web::NewUser::additional_process' />
    </process>
    
   <presentation type='xslt' filename='new-user/additional.xsl' />
 </screen>

 <screen id='new-user/affiliation'>
   <param name='affiliation' type='printable' />
   <param name='action'      type='printable' required="yes"/>
   <param name='search-by'   type='printable' />
   <param name='search-what' type='printable' />

    <call function='ACIS::Web::load_session' />
    
    <init>
     <call function='ACIS::Web::Affiliations::make_it_visible'/>
    </init>
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::Affiliations::general_handler'/>
    </process>

    <presentation type='xslt' filename='new-user/affiliation.xsl' />

 </screen>
 
 <screen id='new-user/new-institution'>
    <param name='name'     type='printable' required='yes' />
    <param name='name-english' type='printable' />
    <param name='location' type='printable' required='yes' />
    <param name='homepage' type='url'       required='yes' />
    <param name='email'    type='simpleemail'     />

    <param name='postal'   type='printable' />
    <param name='phone'    type='printable' />
    <param name='fax'      type='printable' />
    <param name='handle'   type='printable' />
    <param name='note'     type='printable' />

    <param name='add-institution'/>

    <call function='ACIS::Web::load_session' />
    
    <process>
      <call function='ACIS::Web::check_input_parameters' />
      <call function='ACIS::Web::Affiliations::submit_institution' />
    </process>

    <presentation type='xslt' filename='general/submit-new-institution.xsl' />
  </screen>

  <screen id='new-user/complete'>
   
    <call function='ACIS::Web::load_session' />
    <call function='ACIS::Web::NewUser::complete'     />
    
    <presentation type='xslt' filename='new-user/complete.xsl' />

  </screen>
  
  <screen id='confirm'>
    <call function='ACIS::Web::NewUser::confirm' />
    
    <presentation type='xslt' filename='new-user/confirm.xsl' />
  </screen>
  
  
<!--
-->

  <screen id='login'>
    <call function='ACIS::Web::authenticate' />

    <presentation type='xslt' filename='general/login.xsl'/>
  </screen>

  <screen id='sorry'>
    <presentation type='xslt' filename='general/sorry.xsl'/>
  </screen>


 <screen id='adm/sessions'>

<!--
    <call function='ACIS::Web::authenticate' />
-->

    <call function='ACIS::Web::Admin::show_sessions'/>
    <presentation type='xslt' filename='special/sessions.xsl'/>
 </screen>


 <screen id='adm/session'>
    <call function='ACIS::Web::Admin::session_act'/>
    <presentation type='xslt' filename='special/session.xsl'/>
 </screen>



</screens>
