[pgAdmin][RM3538] Reset button does not get enabled till all the mandatory fields provided with value in any dialogue.

Aditya Toshniwal <[email protected]> Fri, 15 Nov 2019 10:59:38 +0530
Newsgroups gmane.comp.db.postgresql.pgadmin.devel
Message-ID <CAM9w-_=KRPbFbc=HmpN_LROh8eTf9tvwvFOydfB4+_YN+vNXzw@mail.gmail.com>
Hi Hackers,

Attached is the patch to enable reset button of dialog if any field is
changed. Currently, it is enabled only if all the mandatory fields are
provided.

-- 
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
RM3538.patch (application/octet-stream, 650 B)
diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js
index 0f95b1b2d..90e4fb611 100644
--- a/web/pgadmin/browser/static/js/node.js
+++ b/web/pgadmin/browser/static/js/node.js
@@ -346,7 +346,12 @@ define('pgadmin.browser.node', [
                 this.empty().css('visibility', 'hidden');
               }.bind(that.statusBar));
             }
-            callback(true);
+
+            var sessHasChanged = false;
+            if(this.sessChanged && this.sessChanged()){
+              sessHasChanged = true;
+            }
+            callback(true, sessHasChanged);
 
             return true;
           };