equal
deleted
inserted
replaced
53 |
53 |
54 Here is the source code: |
54 Here is the source code: |
55 |
55 |
56 .. sourcecode:: python |
56 .. sourcecode:: python |
57 |
57 |
58 def sender_value(form): |
58 def sender_value(form, field): |
59 return '%s <%s>' % (form._cw.user.dc_title(), form._cw.user.get_email()) |
59 return '%s <%s>' % (form._cw.user.dc_title(), form._cw.user.get_email()) |
60 |
60 |
61 def recipient_choices(form, field): |
61 def recipient_choices(form, field): |
62 return [(e.get_email(), e.eid) |
62 return [(e.get_email(), e.eid) |
63 for e in form.cw_rset.entities() |
63 for e in form.cw_rset.entities() |
64 if e.get_email()] |
64 if e.get_email()] |
65 |
65 |
66 def recipient_value(form): |
66 def recipient_value(form, field): |
67 return [e.eid for e in form.cw_rset.entities() |
67 return [e.eid for e in form.cw_rset.entities() |
68 if e.get_email()] |
68 if e.get_email()] |
69 |
69 |
70 class MassMailingForm(forms.FieldsForm): |
70 class MassMailingForm(forms.FieldsForm): |
71 __regid__ = 'massmailing' |
71 __regid__ = 'massmailing' |