communication: check send with attach if from sidebar

This commit is contained in:
Rushabh Mehta 2012-11-29 17:00:53 +05:30
parent cbb3477411
commit 46fd5c121e
3 changed files with 5 additions and 2 deletions

View file

@ -137,7 +137,6 @@
"lib/public/js/legacy/widgets/form/grid.js",
"lib/public/js/legacy/widgets/form/form_grid.js",
"lib/public/js/legacy/widgets/form/print_format.js",
"lib/public/js/legacy/widgets/form/email.js",
"lib/public/js/legacy/widgets/form/clientscriptAPI.js",
"lib/public/js/legacy/widgets/form/form_comments.js",
"lib/public/js/legacy/wn/widgets/form/sidebar.js",

View file

@ -203,7 +203,8 @@ _f.Frm.prototype.email_doc = function() {
new wn.views.CommunicationComposer({
doc: this.doc,
subject: get_doctype_label(this.meta.name) + ': ' + this.docname,
recipients: this.doc.email || this.doc.email_id || this.doc.contact_email
recipients: this.doc.email || this.doc.email_id || this.doc.contact_email,
attach_document_print: true
});
}

View file

@ -160,6 +160,9 @@ wn.views.CommunicationComposer = Class.extend({
var me = this;
var fields = this.dialog.fields_dict;
if(this.attach_document_print)
$(fields.attach_document_print.input).attr("checked", "checked")
$(fields.send_email.input).attr("checked", "checked")
$(fields.add_reply.input).click(function() {
var form_values = me.dialog.get_values();