<!-- $Id: compose_mail.tt2 4814 2008-01-22 15:55:07Z david.verdin $ -->

<form action="[% path_cgi %]" method="post" name="compose_mail">
<fieldset>
[%|loc(user.email)%]From: %1[%END%]<br />
[%|loc(mailto)%]To: %1[%END%]<br />
<label for="subject">[%|loc%]Subject:[%END%] <input id="subject" type="text" size="45" name="subject" value="[% subject %]" /></label>

<br />
<input type="hidden" name="in_reply_to" value="[% in_reply_to %]" />
<input type="hidden" name="message_id" value="[% message_id %]" />
<input type="hidden" name="list" value="[% list %]" />
[% SET counter = 0 %]
[% SET stringto = '' %]
[% FOREACH r = recipients %]
    [% IF counter == 0 %]
        [% stringto = r.value.local_to _ ' ' _ r.value.domain_to %]
	[% counter = 1 %]
    [% ELSE %]
        [% stringto = stringto _ ',' _ r.value.local_to _ ' ' _ r.value.domain_to %]
    [% END %]
[% END %]
<input type="hidden" name="to" value="[% stringto %]" />

 [% IF request_topic %]
   <br /><br />
   [%|loc%]This list is configured to require topic(s).[%END%]
   <br />
   [%|loc%]Please select one or more topic(s) that corresponds to your message :[%END%]
   <br /><br /> 
   [% FOREACH t = available_topics %]
     <input type="checkbox" name="topic_[%t.name%]" value="1"/> [% t.title %]
     <br />
   [% END %]
   <br />
 [%  END %]
 

<textarea name="body" cols="80" rows="25">
</textarea>

<input class="MainMenuLinks" type="submit" name="action_send_mail" value="[%|loc%]Send this mail[%END%]"
[%- IF topic_required -%] onclick="return checkbox_check_topic(compose_mail)" [% END %] />
</fieldset>
</form>
