forked from sympa-community/sympa
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose_mail.tt2
88 lines (83 loc) · 5.04 KB
/
compose_mail.tt2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!-- compose_mail.tt2 -->
<form class="noborder" action="[% path_cgi %]" method="post" name="compose_mail" enctype="multipart/form-data">
<fieldset>
[%|loc(user.email)%]From: %1[%END%]<br />
[% mailto = BLOCK ~%]
[% to | mailto(to) | obfuscate(listconf.spam_protection) %]
[%~END~%]
[%|loc(mailto)%]To: %1[%END%]<br />
<label for="subject">
[%|loc%]Subject:[%END%]
<input id="subject" type="text" size="45" name="subject" value="[% subject %]" />
</label>
[% IF subaction == "html_news_letter" %]
<input type="hidden" name="html_news_letter" value="[% subaction %]" />
[% END %]
<input type="hidden" name="action" value="send_mail"/>
<input class="MainMenuLinks" type="submit" name="sub_action_sendmailtolist" value="[%|loc%]Send to list[%END%]" [%- IF topic_required -%] onclick="return checkbox_check_topic(compose_mail)" [% END %]/>
<input class="MainMenuLinks" type="submit" name="sub_action_sendmailtome" value="[%|loc%]Send to me[%END%]" [%- IF topic_required -%] onclick="return checkbox_check_topic(compose_mail)" [% END %]/>
<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 />
[%|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 />
[% FOREACH t = available_topics %]
<input id="topic_[%t.name%]" type="checkbox" name="topic_[%t.name%]" value="1"/>
<label for="topic_[%t.name%]">[% t.title %]</label>
<br />
[% END %]
<br />
[% END %]
[% IF !subaction %]
[% balise_email = '['_'%'_' user.email '_'%'_']' %]
[% balise_fingerprint = '['_'%'_' user.fingerprint '_'%'_']' %]
<textarea name="body" id="body" cols="80" rows="25">[% body %]</textarea>
<br />
[% IF listconf.personalization_feature == 'on' && listconf.personalization.web_apply_on == 'all' %]
<br />
<b>[%|loc%]Messages customization: use the template syntax:[%END%] <a href="http://www.tt2.org">TT2</a></b>
<br />
[%|loc%]Below are some examples of TT2 parameters usable in messages.[%END%]
<br />
<ul>
<li> <b>[% listname %]</b>[%|loc%]: the list name; always available.[%END%]</li>
<li> <b>[% robot %]</b>[%|loc%]: the name of the host the list is installed on; always available.[%END%]</li>
<li> <b>[% user.email %]</b>[%|loc%]: the user email; always available.[%END%]</li>
<li> <b>[% user.gecos %]</b>[%|loc%]: the user name associated to her email; always available.[%END%]</li>
<li> <b>[% user.friendly_date %]</b>[%|loc%]: the - human readable - user's subscription date; always available.[%END%]</li>
<li> <b>[% user.custom_attribute.title.value %]</b>[%|loc%]: can be anything you like; available if you defined a user custom attribute named "title" (see the list configuration, section "Miscellaneous").[%END%]</li>
<li> <b>[% user.custom_attribute.name.value %]</b>[%|loc%]: can be anything you like; available if you defined a user custom attribute named "name".[%END%]</li>
<li> <b>[% user.custom_attribute.organization.value %]</b>[%|loc%]: can be anything you like; available if you defined a user custom attribute named "organization".[%END%]</li>
</ul>
[% END %]
[% END %]
[% IF subaction == "html_news_letter" %]
<br />
<h3>[%|loc%]Select the source of your HTML newsletter[%END%]</h3>
<label for="url"><strong>[%|loc%]Send the page from the following URL:[%END%] </strong></label>
<input id="url" type="text" size="55" name="url" value="[% url %]" />
<p>
<strong>[%|loc%]OR[%END%]</strong>
</p>
<label for="uploaded_file">[%|loc%]<strong>Send an HTML file from your computer:[%END%] </strong></label>
<input id="uploaded_file" type="file" size="45" name="uploaded_file"/>
[% END %]
</fieldset>
</form>
<!-- end compose_mail.tt2 -->