From: erickson Date: Mon, 23 Feb 2009 16:14:44 +0000 (+0000) Subject: treat '' as null only when otherwise not dealt with.. '' == false in checkboxes X-Git-Tag: sprint4-merge-nov22~10737 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e5b74effa66e42bdf7a3e6ce43c599601f7e9642;p=working%2FEvergreen.git treat '' as null only when otherwise not dealt with.. '' == false in checkboxes git-svn-id: svn://svn.open-ils.org/ILS/trunk@12274 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index 96a2a434ed..e1e43cb31a 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -45,17 +45,13 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { */ getFormattedValue : function() { var value = this.baseWidgetValue(); - - /* text widgets default to "" when no data is entered */ - if(value == '') return null; - switch(this.idlField.datatype) { case 'bool': return (value) ? 't' : 'f' case 'timestamp': return dojo.date.stamp.toISOString(value); default: - return value; + return (value == '') ? null : value; } },