web/views/massmailing.py
branchtls-sprint
changeset 742 99115e029dca
parent 640 8e64f12be69c
child 984 536e421b082b
equal deleted inserted replaced
739:39721e56b56d 742:99115e029dca
    17 
    17 
    18 
    18 
    19 class SendEmailAction(Action):
    19 class SendEmailAction(Action):
    20     category = 'mainactions'
    20     category = 'mainactions'
    21     # XXX should check email is set as well
    21     # XXX should check email is set as well
    22     __selectors__ = (implements(IEmailable), match_user_groups('managers', 'users'))
    22     __select__ = implements(IEmailable) & match_user_groups('managers', 'users')
    23 
    23 
    24     id = 'sendemail'
    24     id = 'sendemail'
    25     title = _('send email')
    25     title = _('send email')
    26 
    26 
    27     def url(self):
    27     def url(self):
    32                               **params)
    32                               **params)
    33 
    33 
    34 
    34 
    35 class MassMailingForm(EntityView):
    35 class MassMailingForm(EntityView):
    36     id = 'massmailing'
    36     id = 'massmailing'
    37     __selectors__ = (implements(IEmailable), match_user_groups('managers', 'users'))
    37     __select__ = implements(IEmailable) & match_user_groups('managers', 'users')
    38 
    38 
    39     form_template = u"""
    39     form_template = u"""
    40 <div id="compose">
    40 <div id="compose">
    41 <form id="sendemail" action="sendmail" method="post">
    41 <form id="sendemail" action="sendmail" method="post">
    42 <table class="headersform">
    42 <table class="headersform">