From 2d1f33cb06e6efdb02e6a038ea0924a07770a2bb Mon Sep 17 00:00:00 2001 From: Carlos Lopez-Camey Date: Sat, 2 May 2015 15:42:08 -0600 Subject: [PATCH] Set default javascript parameter values in the functions addformReset, addFormShow --- hledger-web/static/hledger.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hledger-web/static/hledger.js b/hledger-web/static/hledger.js index 3b62aeba3..2cca10a5b 100644 --- a/hledger-web/static/hledger.js +++ b/hledger-web/static/hledger.js @@ -126,7 +126,8 @@ function registerChartClick(ev, pos, item) { //---------------------------------------------------------------------- // ADD FORM -function addformShow(showmsg=false) { +function addformShow(showmsg) { + showmsg = typeof showmsg !== 'undefined' ? a : false; addformReset(showmsg); $('#addmodal') .on('shown.bs.modal', function (e) { @@ -136,7 +137,8 @@ function addformShow(showmsg=false) { } // Make sure the add form is empty and clean for display. -function addformReset(showmsg=false) { +function addformReset(showmsg) { + showmsg = typeof showmsg !== 'undefined' ? a : false; if ($('form#addform').length > 0) { if (!showmsg) $('div#message').html(''); $('form#addform')[0].reset();