<!-- $Id: subrequest.tt2 4992 2008-05-05 14:06:16Z sympa-authors $ -->


  [% IF status == 'auth' %]

        [% IF listconf.custom_attribute.size == 0 %]
          [%|loc(list)%]You requested a subscription to list %1[%END%].
          [%|loc%]To confirm your request, please click the button below :[%END%]<br />
        [% ELSE %] [%|loc(list)%]You want to subscribe to list %1[%END%].
          [%|loc%]Please fill in the form below and then click the validation button[%END%]<br />
          <br />
	[% END %]
        <br /><br />

        <form action="[% path_cgi %]" method="post">
        <fieldset>
          <input type="hidden" name="list" value="[% list %]" />
          <input type="hidden" name="email" value="[% user.email %]" />
          [% PROCESS edit_attributes.tt2 %]

	  <input type="hidden" name="via_subrequest" value="1" />
          <input class="MainMenuLinks" type="submit" name="action_subscribe" value="[%|loc(list)%]I subscribe to list %1[%END%]" />
        </fieldset>
        </form>

  [% ELSIF status == 'notauth_passwordsent' %]

        [%|loc(list)%]You requested a subscription to list %1[%END%].
        <br /><br />
        [%|loc%]To confirm your identity and prevent anyone from subscribing you to
        this list against your will, a message containing your password
        will be sent to you.[%END%] <br /><br />
        [%|loc(list)%]Check your mailbox for new messages and examine the message from Sympa to find your password.
	Enter that password below. This will confirm your subscription to list %1.[%END%]

        <form class="bold_label" action="[% path_cgi %]" method="post">
        <fieldset>
          <label>[%|loc%]e-mail address[%END%]</label> [% email %]<br />
          [% FOREACH k IN list_conf.custom_attribute.sort %]
          <label><b>[% k.name %]</b></label> [% custom_attribute.item(k.id).value %]<br />
          <input type="hidden" name="custom_attribute.[% k.id %]" id="custom_attribute.[% k.id %]" value="[% custom_attribute.item(k.id).value %]" />
          [% END %]
          <label for="passwd">[%|loc%]password[%END%]</label>
          <input id="passwd" type="password" name="passwd" size="20" />
          <input type="hidden" name="list" value="[% list %]" />
          <input type="hidden" name="email" value="[% email %]" />
          <input type="hidden" name="previous_list" value="[% list %]" />
          <input type="hidden" name="previous_action" value="subrequest" />
	  <input type="hidden" name="via_subrequest" value="1" />
        &nbsp; &nbsp; &nbsp;<input class="MainMenuLinks" type="submit" name="action_subscribe" value="[%|loc%]Subscribe[%END%]" />
        </fieldset>
        </form>

        [%|loc%]This password, associated with your email address, willallow you to access your custom environment.[%END%]

  [% ELSIF status == 'notauth_noemail' %]

        <form class="bold_label" action="[% path_cgi %]" method="post">
        <fieldset>
          <label for="email">[%|loc%]Your e-mail address[%END%]</label>
          <input type="text" name="email" size="30" /><br />
          <input type="hidden" name="list" value="[% list %]" />
          <input type="hidden" name="action" value="subrequest" />
  	  <input type="hidden" name="via_subrequest" value="1" />
        <input class="MainMenuLinks" type="submit" name="action_subrequest" value="[%|loc%]submit[%END%]" />
        </fieldset>
         </form>


  [% ELSIF status == 'notauth' %]

          [%|loc(list)%]To confirm your subscription to list %1, please enter
        your password below[%END%]
        [% IF listconf.custom_attribute.size == 0 %]
          [%|loc%], in addition to the personnal informations requested.[%END%]
	[% END %]

         <form action="[% path_cgi %]" METHOD=POST>
        <fieldset>
          <label><b>[%|loc%]e-mail address[%END%]</b></label> [% email %]<br />
          <label for="passwd">[%|loc%]password[%END%]</label>
         <input id="passwd" type="password" name="passwd" size="20" /><br />

         [% PROCESS edit_attributes.tt2 %]
          <input type="hidden" name="list" value="[% list %]" />
          <input type="hidden" name="email" value="[% email %]" />
          <input type="hidden" name="previous_list" value="[% list %]" />
          <input type="hidden" name="previous_action" value="subrequest" />
 	  <input type="hidden" name="via_subrequest" value="1" />
        &nbsp; &nbsp; &nbsp;<input class="MainMenuLinks" type="submit" name="action_subscribe" value="[%|loc%]Subscribe[%END%]" />
        <input class="MainMenuLinks" type="submit" name="action_sendpasswd" value="[%|loc%]My password ?[%END%]" />
        </fieldset>
         </form>

  [% ELSIF status == 'notauth_subscriber' %]

        <strong>[%|loc(list)%]You are already subscriber of list %1[%END%].</strong>
        <br /><br />


        [% PROCESS 'loginbanner.tt2' %]

  [% END %]


