1 <html xmlns="http://www.w3.org/1999/xhtml"
2 metal:use-macro="here/main_template/macros/master">
5 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
6 <title>Envoi de message</title>
9 <body tal:omit-tag="" metal:fill-slot="main" i18n:domain="plinn">
10 <div tal:replace="options/send_fields|nothing"></div>
11 <form action="." method="post" tal:attributes="action string:${here/absolute_url}/send_email">
12 <table tal:define="og python:options.get ;
13 expand python:og('expand', '');
14 other_adr python:og('other_adr', []);
15 batchM python:og('batchM', here.valid_roles());
16 customized_batch python:og('customized_batch', {}) ;
17 subject python:og('subject', '');
18 text_body python:og('text_body', '');
19 send_fields python:og('send_fields', {});
20 wfid request/wfid|nothing;
22 class="send_email_form">
25 <h1 i18n:translate="">Send an email</h1>
29 <td i18n:translate="">Recipients:</td>
33 <div tal:repeat="roleAndMembers here/getRecipients">
34 <fieldset tal:define="r python:roleAndMembers[0] ; mir python:roleAndMembers[1]">
35 <legend tal:content="python:r" i18n:translate="">Role name</legend>
37 <div metal:use-macro="template/macros/send_field_chooser">To CC CCi</div>
40 <div tal:repeat="m mir" tal:omit-tag="" tal:condition="python:len(mir) <= 10">
41 <label tal:define="selectAll python:r in batchM">
42 <input type="checkbox"
43 tal:attributes="value m/getId;
44 name python:'customized_batch.%s:list:record' % r;
45 checked python:selectAll or m.getId() in customized_batch.get(r,[])" />
46 <span tal:replace="python:m.getMemberFullName(nameBefore=0)">membre</span>
47 <span tal:condition="python:m == member" i18n:translate="">(as copy)</span>
53 <div tal:omit-tag="" tal:condition="python:len(mir) > 10">
55 <div tal:define="selectAll python:r in batchM or len(customized_batch.get(r,[])) == len(mir)"
58 <!-- condensed display -->
59 <div tal:condition="python:not expand == r" tal:omit-tag="">
60 <label tal:condition="python:selectAll or not customized_batch.has_key(r)">
61 <input type="checkbox" name="batchM:list" value="role" tal:attributes="value r ; checked python:selectAll or r in batchM" />
62 <span i18n:translate="">All (<span i18n:name="nofpers" tal:replace="python:len(mir)">120</span> persons)</span>
64 <div tal:condition="python:not( selectAll or not customized_batch.has_key(r) )" tal:omit-tag="">
65 <span tal:replace="python:len(customized_batch[r])">n</span>/<span tal:replace="python:len(mir)">tot</span> <span i18n:translate="" tal:content="python:len(customized_batch[r])>1 and 'persons selected' or 'person selected'" tal:omit-tag="">persons selected</span>
66 <!-- hidden inputs -->
67 <input type="hidden" tal:attributes="value python:' '.join(customized_batch[r]) ; name python:'customized_batch.%s:tokens:record'%r" />
69 <input type="submit" value="Show list" name="expand.role" tal:attributes="name string:expand.${r}:record" i18n:attributes="value" />
72 <!-- collaped display -->
73 <div tal:condition="python:expand == r" tal:omit-tag="">
74 <select size="10" multiple="multiple" name="customized_batch.role:list:record" tal:condition="python:expand == r"
75 tal:attributes="name python:'customized_batch.%s:list:record' % r">
76 <option tal:repeat="m mir" tal:attributes="value m/getId ; selected python:(not customized_batch.has_key(r)) and True or (m.id in customized_batch[r])" tal:content="python:m.getMemberFullName(nameBefore=1)" >PIN Benoît</option>
79 <input type="submit" value="Validate" i18n:attributes="value" name="collapse" /> <span i18n:translate="" tal:omit-tag="">(not required)</span>
90 <legend i18n:translate="">Others (on address by line)</legend>
91 <textarea name="other_adr:lines" rows="3" cols="74" tal:content="python:'\n'.join(other_adr)"></textarea>
96 <td><span i18n:translate="">Subject:</span><br />
97 <textarea name="subject" rows="1" cols="74" tal:content="subject"></textarea>
101 <td><span i18n:translate="">Message body:</span><br />
102 <textarea name="text_body" rows="18" cols="74" tal:content="text_body"></textarea>
107 <input type="submit" value="Send email" i18n:attributes="value" />
108 <div tal:condition="wfid">
109 <input type="hidden" name="wfid" tal:attributes="value wfid" /><br />
110 <em i18n:translate="">Note: This message will be stored in content history.</em>
119 <tal:block tal:replace="nothing">
120 <div style="float:right" metal:define-macro="send_field_chooser" i18n:domain="plinn">
122 <input type="radio" value="to"
123 tal:attributes="name python:'send_fields.%s:record' % r;
124 checked python:(not send_fields.get(r) and True) or (send_fields.get(r) == 'to')" />
125 <span i18n:translate="mail_to" tal:omit-tag="">To</span>
128 <input type="radio" value="cc"
129 tal:attributes="name python:'send_fields.%s:record' % r;
130 checked python:send_fields.get(r) == 'cc'" />
131 <span i18n:translate="mail_cc" tal:omit-tag="">CC</span>
134 <input type="radio" value="bcc"
135 tal:attributes="name python:'send_fields.%s:record' % r;
136 checked python:send_fields.get(r) == 'bcc'" />
137 <span i18n:translate="mail_bcc" tal:omit-tag="">BCC</span>