# HG changeset patch # User Adrien Di Mascio # Date 1240557652 -7200 # Node ID 972517be96dcb05938fea92e7694c128954a5433 # Parent 07a2d0c387cadb6fcbd5d041cf7ba1dbbd1edf36 sendmail form should now work as before diff -r 07a2d0c387ca -r 972517be96dc web/data/cubicweb.widgets.js --- a/web/data/cubicweb.widgets.js Fri Apr 24 09:06:56 2009 +0200 +++ b/web/data/cubicweb.widgets.js Fri Apr 24 09:20:52 2009 +0200 @@ -222,8 +222,7 @@ __init__ : function(wdgnode) { this.variables = getNodeAttribute(wdgnode, 'cubicweb:variables').split(','); - this.options = {'name' : wdgnode.getAttribute('cubicweb:inputname'), - 'id' : wdgnode.getAttribute('cubicweb:inputid'), + this.options = {'name' : wdgnode.getAttribute('cubicweb:inputid'), 'rows' : wdgnode.getAttribute('cubicweb:rows') || 40, 'cols' : wdgnode.getAttribute('cubicweb:cols') || 80 }; diff -r 07a2d0c387ca -r 972517be96dc web/views/basecontrollers.py --- a/web/views/basecontrollers.py Fri Apr 24 09:06:56 2009 +0200 +++ b/web/views/basecontrollers.py Fri Apr 24 09:20:52 2009 +0200 @@ -551,7 +551,7 @@ def publish(self, rset=None): # XXX this allow anybody with access to an cubicweb application to use it as a mail relay body = self.req.form['mailbody'] - subject = self.req.form['mailsubject'] + subject = self.req.form['subject'] for recipient in self.recipients(): text = body % recipient.as_email_context() self.sendmail(recipient.get_email(), subject, text) diff -r 07a2d0c387ca -r 972517be96dc web/views/massmailing.py --- a/web/views/massmailing.py Fri Apr 24 09:06:56 2009 +0200 +++ b/web/views/massmailing.py Fri Apr 24 09:20:52 2009 +0200 @@ -42,7 +42,7 @@ recipient = StringField(widget=CheckBox(), label=_('Recipients:')) subject = StringField(label=_('Subject:')) mailbody = StringField(widget=AjaxWidget(wdgtype='TemplateTextField', - inputid='mailarea')) + inputid='mailbody')) form_buttons = [ImgButton('sendbutton', "javascript: $('#sendmail').submit()", _('send email'), 'SEND_EMAIL_ICON'), ImgButton('cancelbutton', "javascript: history.back()",