From 1dc4968c3ad71da0db6fc7d95648e39b0af06fb3 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 3 Jun 2014 14:10:53 +0530 Subject: [PATCH] Fixes frappe/erpnext#1732 and frappe/erpnext#1733 --- frappe/public/js/frappe/dom.js | 11 ++++++++--- frappe/public/js/legacy/datatype.js | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frappe/public/js/frappe/dom.js b/frappe/public/js/frappe/dom.js index 75df706536..1fec30516c 100644 --- a/frappe/public/js/frappe/dom.js +++ b/frappe/public/js/frappe/dom.js @@ -243,9 +243,14 @@ frappe.dom.set_box_shadow = function(ele, spread) { // create options for(var i=0; i').html(label || "").attr('value', value).appendTo(this); + if (is_null(v)) { + var value = null; + var label = null; + } else { + var value = is_null(v.value) ? v : v.value; + var label = is_null(v.label) ? __(v) : __(v.label); + } + $('