better notification message

This commit is contained in:
Rushabh Mehta 2012-06-07 11:00:33 +05:30
parent c91e16dd1e
commit 0873e75fb2
2 changed files with 4 additions and 3 deletions

View File

@ -42,8 +42,8 @@ cur_frm.cscript.notify = function(doc, args) {
} }
})(); })();
if(res.send) { if(res.send) {
if(validate_email(args['send_to'] || doc.contact_email || '')) {
var print_heading = (doc.select_print_heading || args['type']) var print_heading = (doc.select_print_heading || args['type'])
if(validate_email(args['send_to'] || doc.contact_email || '')) {
sendmail( sendmail(
args['send_to'] || doc.contact_email, args['send_to'] || doc.contact_email,
send_from, send_from,
@ -55,7 +55,8 @@ cur_frm.cscript.notify = function(doc, args) {
msgprint('This ' + print_heading + ' is being sent to <b>' msgprint('This ' + print_heading + ' is being sent to <b>'
+ (args['send_to'] || doc.contact_email) + '</b><br />...'); + (args['send_to'] || doc.contact_email) + '</b><br />...');
} else { } else {
msgprint('Invalid/Missing Email Address. ' + print_heading + ' not sent.'); msgprint('Invalid/Missing Email Address of Contact. Auto notification for '
+ print_heading + ' not sent.');
} }
} }
} }

View File

@ -22,4 +22,4 @@ def send_message():
webnotes.msgprint('Please give us your email id so that we can write back to you', raise_exception=True) webnotes.msgprint('Please give us your email id so that we can write back to you', raise_exception=True)
d.save() d.save()
webnotes.msgprint('Thank you for your query, we will get back to you asap.') webnotes.msgprint('Thank you!')