blob: dbf65dd04dd46d29dbb14f908a402a4093c9d521 [file] [log] [blame]
Anand Doshi486f9df2012-07-19 13:40:31 +05301from __future__ import unicode_literals
Rushabh Mehtac01b7e92012-03-21 12:29:56 +05302install_docs = [
Anand Doshi24e18562012-04-17 11:45:35 +05303 {"doctype":"Role", "role_name":"Blogger", "name":"Blogger"},
4 {"doctype":"Role", "role_name":"Website Manager", "name":"Website Manager"},
5]
Rushabh Mehta389880d2012-04-27 18:39:14 +05306
7import webnotes
8
9@webnotes.whitelist(allow_guest=True)
10def send_message():
11 from webnotes.model.doc import Document
12 args = webnotes.form_dict
13
14 d = Document('Support Ticket')
15 d.subject = webnotes.form_dict.get('subject', 'Website Query')
16 d.description = webnotes.form_dict.get('message')
17 d.raised_by = webnotes.form_dict.get('sender')
18
19 if not d.description:
20 webnotes.msgprint('Please write something', raise_exception=True)
21
22 if not d.raised_by:
23 webnotes.msgprint('Please give us your email id so that we can write back to you', raise_exception=True)
24
25 d.save()
Rushabh Mehta0873e752012-06-07 11:00:33 +053026 webnotes.msgprint('Thank you!')