From 0422311fb6f68c99d9bb00209b159dd3fc3582c8 Mon Sep 17 00:00:00 2001 From: RobertSchouten Date: Mon, 12 Sep 2016 18:45:39 +0800 Subject: [PATCH] print format show default heading for editing (#2039) * print format show default heading for editing * print format show default heading for editing --- .../page/print_format_builder/print_format_builder.js | 3 +++ .../print_format_builder/print_format_builder_layout.html | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frappe/print/page/print_format_builder/print_format_builder.js b/frappe/print/page/print_format_builder/print_format_builder.js index 89d5b722bb..21fc6e8fc3 100644 --- a/frappe/print/page/print_format_builder/print_format_builder.js +++ b/frappe/print/page/print_format_builder/print_format_builder.js @@ -457,6 +457,9 @@ frappe.PrintFormatBuilder = Class.extend({ }, setup_edit_heading: function() { var me = this; + if (!me.print_heading_template) { + $(this.page.main.find(".print-heading")).html('

'+me.print_format.doc_type+'
{{ doc.name }}

') + } this.page.main.find(".edit-heading").on("click", function() { var $heading = $(this).parents(".print-format-builder-header:first") .find(".print-format-builder-print-heading"); diff --git a/frappe/print/page/print_format_builder/print_format_builder_layout.html b/frappe/print/page/print_format_builder/print_format_builder_layout.html index 713bf1643a..0d9c9293a7 100644 --- a/frappe/print/page/print_format_builder/print_format_builder_layout.html +++ b/frappe/print/page/print_format_builder/print_format_builder_layout.html @@ -8,8 +8,11 @@ {%= __("Edit Heading") %}