web/views/massmailing.py
changeset 2005 e8032965f37a
parent 1995 ec95eaa2b711
child 2058 7ef12c03447c
--- a/web/views/massmailing.py	Fri May 29 14:07:42 2009 +0200
+++ b/web/views/massmailing.py	Fri May 29 14:19:30 2009 +0200
@@ -15,10 +15,10 @@
 from cubicweb.view import EntityView
 from cubicweb.web import stdmsgs
 from cubicweb.web.action import Action
-from cubicweb.web.form import FieldsForm, FormViewMixIn
+from cubicweb.web.form import FormViewMixIn
 from cubicweb.web.formfields import StringField
 from cubicweb.web.formwidgets import CheckBox, TextInput, AjaxWidget, ImgButton
-from cubicweb.web.views import formrenderers
+from cubicweb.web.views import forms, formrenderers
 
 
 class SendEmailAction(Action):
@@ -37,12 +37,12 @@
                               **params)
 
 
-class MassMailingForm(FieldsForm):
+class MassMailingForm(forms.FieldsForm):
     id = 'massmailing'
 
     sender = StringField(widget=TextInput({'disabled': 'disabled'}), label=_('From:'))
     recipient = StringField(widget=CheckBox(), label=_('Recipients:'))
-    subject = StringField(label=_('Subject:'))
+    subject = StringField(label=_('Subject:'), max_length=256)
     mailbody = StringField(widget=AjaxWidget(wdgtype='TemplateTextField',
                                              inputid='mailbody'))