From d0baea0d4bc3414f1469388b87deaaf60eae5b44 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 30 Nov 2015 10:31:01 +0530 Subject: [PATCH 1/4] [fix] remove not-implemented feature convert_to in Communication --- .../doctype/communication/communication.js | 24 ------------------- .../doctype/communication/communication.py | 4 ---- 2 files changed, 28 deletions(-) diff --git a/frappe/core/doctype/communication/communication.js b/frappe/core/doctype/communication/communication.js index 406352ece2..3b8501cda0 100644 --- a/frappe/core/doctype/communication/communication.js +++ b/frappe/core/doctype/communication/communication.js @@ -1,27 +1,3 @@ -frappe.ui.form.on("Communication", "setup", function(frm) { - frappe.call({ - method:"frappe.core.doctype.doctype.communication.get_convert_to", - callback: function(r) { - frappe.communication_convert_to = r.message; - frm.convert_to_click = []; - $.each(r.message, function(i, v) { - frm.convert_to_click.append({label:__(v), value:v, action:function() { - frm.convert_to($(this).attr("data-value")); - }}); - }); - frm.set_convert_button(); - } - }); - - frm.set_convert_button = function() { - frm.add_custom_button(__("Add To"), frm.convert_to_click); - }; - - frm.convert_to = function(doctype) { - - }; -}); - frappe.ui.form.on("Communication", "refresh", function(frm) { frm.convert_to_click && frm.set_convert_button(); frm.subject_field = "subject"; diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index c46f02f6d9..2b1ec594d4 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -394,7 +394,3 @@ def make(doctype=None, name=None, content=None, subject=None, sent_or_received = "name": comm.name, "emails_not_sent_to": ", ".join(comm.emails_not_sent_to) if hasattr(comm, "emails_not_sent_to") else None } - -@frappe.whitelist() -def get_convert_to(): - return frappe.get_hooks("communication_convert_to") From cfb8c9cab31c3215d78d0b1491cf4b741a413bc1 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 30 Nov 2015 10:50:45 +0530 Subject: [PATCH 2/4] [minor] validate file is attached --- frappe/core/page/user_permissions/user_permissions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frappe/core/page/user_permissions/user_permissions.js b/frappe/core/page/user_permissions/user_permissions.js index 2828b0ab1a..56d5a07e2c 100644 --- a/frappe/core/page/user_permissions/user_permissions.js +++ b/frappe/core/page/user_permissions/user_permissions.js @@ -139,10 +139,15 @@ frappe.UserPermissions = Class.extend({ ], primary_action_label: __("Upload and Sync"), primary_action: function() { + var filedata = d.fields_dict.attach.get_value(); + if(!filedata) { + msgprint(_("Please attach a file")); + return; + } frappe.call({ method:"frappe.core.page.user_permissions.user_permissions.import_user_permissions", args: { - filedata: d.fields_dict.attach.get_value() + filedata: filedata }, callback: function(r) { if(!r.exc) { From 3313622e1c085f38cb77db5a68a26f765a78258c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 30 Nov 2015 11:29:57 +0530 Subject: [PATCH 3/4] [minor] translation fix --- frappe/public/js/frappe/form/toolbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/form/toolbar.js b/frappe/public/js/frappe/form/toolbar.js index b47a33fe6f..ae969370da 100644 --- a/frappe/public/js/frappe/form/toolbar.js +++ b/frappe/public/js/frappe/form/toolbar.js @@ -295,10 +295,10 @@ frappe.ui.form.Toolbar = Class.extend({ if(has_workflow) { return; } else if(docstatus==1 && p[CANCEL]) { - this.page.set_secondary_action('Cancel', function() { + this.page.set_secondary_action(__('Cancel)', function() { me.frm.savecancel(this) }, 'icon-ban-circle'); } else if(docstatus==2 && p[AMEND]) { - this.page.set_secondary_action('Amend', function() { + this.page.set_secondary_action(__('Amend'), function() { me.frm.amend_doc() }, 'icon-pencil', true); } }, From 30486ca9a6cb0b058bc982f4a77041df36c9f54c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 30 Nov 2015 12:32:07 +0600 Subject: [PATCH 4/4] bumped to version 6.10.3 --- frappe/__version__.py | 2 +- frappe/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/__version__.py b/frappe/__version__.py index 42069eff07..f2f2131567 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = "6.10.2" +__version__ = "6.10.3" diff --git a/frappe/hooks.py b/frappe/hooks.py index e7cae925c2..eb9e790e13 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd." app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node" app_icon = "octicon octicon-circuit-board" -app_version = "6.10.2" +app_version = "6.10.3" app_color = "orange" source_link = "https://github.com/frappe/frappe" app_license = "MIT" diff --git a/setup.py b/setup.py index 45c0a185b5..c59dcafe1a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = "6.10.2" +version = "6.10.3" with open("requirements.txt", "r") as f: install_requires = f.readlines()