public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM6414]: Help message not displaying correctly on Create - Login/Group Role
Date: Sun, 16 May 2021 16:45:40 +0530
Message-ID: <CAJ9T6Ss+bOMU5DkyEN6ogddrCH5EkAxr7z09hxQcL1LEnA47PA@mail.gmail.com> (raw)

Hi Hackers,

Please find the attached patch for #6414 Help message not displaying
correctly on Create - Login/Group Role.

-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM6414.patch (2.1K, 3-RM6414.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js
index 92a02735a..dcb99eb26 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js
+++ b/web/pgadmin/browser/server_groups/servers/roles/static/js/role.js
@@ -515,7 +515,13 @@ define('pgadmin.node.role', [
           filter: function(d) {
             return this.model.isNew() || (this.model.get('rolname') != d.label);
           },
-          helpMessage: 'helpMessage',
+          helpMessage: function(m) {
+            if (m.has('read_only') && m.get('read_only') == false) {
+              return gettext('Select the checkbox for roles to include WITH ADMIN OPTION.');
+            } else {
+              return gettext('Roles shown with a check mark have the WITH ADMIN OPTION set.');
+            }
+          },
         },
         {
           id: 'rolmembers', label: gettext('Members'), type: 'collection', group: gettext('Membership'),
@@ -535,7 +541,13 @@ define('pgadmin.node.role', [
           filter: function(d) {
             return this.model.isNew() || (this.model.get('rolname') != d.label);
           },
-          helpMessage: 'helpMessage',
+          helpMessage: function(m) {
+            if (m.has('read_only') && m.get('read_only') == false) {
+              return gettext('Select the checkbox for roles to include WITH ADMIN OPTION.');
+            } else {
+              return gettext('Roles shown with a check mark have the WITH ADMIN OPTION set.');
+            }
+          },
         },
         {
           id: 'variables', label: '', type: 'collection',
@@ -591,13 +603,6 @@ define('pgadmin.node.role', [
 
           return null;
         },
-        helpMessage: function(m) {
-          if (m.has('read_only') && m.get('read_only') == false) {
-            return gettext('Select the checkbox for roles to include WITH ADMIN OPTION.');
-          } else {
-            return gettext('Roles shown with a check mark have the WITH ADMIN OPTION set.');
-          }
-        },
       }),
     });
   }


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM6414]: Help message not displaying correctly on Create - Login/Group Role
  In-Reply-To: <CAJ9T6Ss+bOMU5DkyEN6ogddrCH5EkAxr7z09hxQcL1LEnA47PA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox