diff -r cb5dfea92285 -r b6e250dd7a7d web/views/massmailing.py --- a/web/views/massmailing.py Fri Apr 23 11:10:30 2010 +0200 +++ b/web/views/massmailing.py Fri Apr 23 12:42:53 2010 +0200 @@ -11,7 +11,7 @@ import operator from cubicweb.interfaces import IEmailable -from cubicweb.selectors import implements, match_user_groups +from cubicweb.selectors import implements, authenticated_user from cubicweb.view import EntityView from cubicweb.web import stdmsgs, action, form, formfields as ff from cubicweb.web.formwidgets import CheckBox, TextInput, AjaxWidget, ImgButton @@ -22,7 +22,7 @@ __regid__ = 'sendemail' # XXX should check email is set as well __select__ = (action.Action.__select__ & implements(IEmailable) - & match_user_groups('managers', 'users')) + & authenticated_user()) title = _('send email') category = 'mainactions' @@ -42,6 +42,11 @@ class MassMailingForm(forms.FieldsForm): __regid__ = 'massmailing' + needs_js = ('cubicweb.widgets.js', 'cubicweb.massmailing.js') + needs_css = ('cubicweb.mailform.css') + domid = 'sendmail' + action = 'sendmail' + sender = ff.StringField(widget=TextInput({'disabled': 'disabled'}), label=_('From:'), value=lambda f: '%s <%s>' % (f._cw.user.dc_title(), f._cw.user.get_email())) @@ -81,7 +86,6 @@ class MassMailingFormRenderer(formrenderers.FormRenderer): __regid__ = 'massmailing' - button_bar_class = u'toolbar' def _render_fields(self, fields, w, form): w(u'