]> git.nbdom.net Git - nb.git/commitdiff
lib/js/nb.js
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 22 Aug 2018 10:48:30 +0000 (11:48 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 22 Aug 2018 10:48:30 +0000 (11:48 +0100)
lib/js/nb.js

index c77695c31ee41c2c281736bf2fcc663736c83227..3c7588f6bc4b0b46cd672edd74212214fff16285 100644 (file)
@@ -268,12 +268,14 @@ function NB(args) {
                return false;
        }
 
-       this.form_clear = function(form) {
+       this.form_clear = function(form,cur=false) {
+       // NB 22.08.18: Add param cur 
                var e;
                for(i=0;i<form.length;i++) {
                        e = form.elements[i];
                        if (e.style.display == 'none') continue;
-                       if (e.type != 'text') continue;
+                       if (!cur && e.type != 'text') continue;
+                       if (cur && (e.name == cur.name)) continue;
                        e.value = ''
                }
        };