Add basic form validation when sending new messages
This avoids the message body for now, since that's implemented a couple different ways in the real world...
This commit is contained in:
parent
378f1ae7fb
commit
94a7a15e6d
4 changed files with 26 additions and 5 deletions
|
@ -207,6 +207,7 @@ class MessagesView(MasterView):
|
|||
def make_form(self, instance, **kwargs):
|
||||
form = super(MessagesView, self).make_form(instance, **kwargs)
|
||||
if self.creating:
|
||||
form.id = 'new-message'
|
||||
form.cancel_url = self.request.get_referrer(default=self.request.route_url('messages.inbox'))
|
||||
return form
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue