Bug 1716704 - Fix edit contact for LDAP card. r=mkmelin
authorPing Chen <remotenonsense@gmail.com>
Wed, 16 Jun 2021 13:00:10 +0300
changeset 32842 9e10b5edb3248473db1218e683a369bfb9b9f7a4
parent 32841 a3983e20bfe34eb73f024ddf7f9e9c56d7c2b304
child 32843 e5a72b98ffde9b3203e669744dfa3b2f54971369
push id18881
push usermkmelin@iki.fi
push dateWed, 16 Jun 2021 10:27:13 +0000
treeherdercomm-central@e5a72b98ffde [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1716704
Bug 1716704 - Fix edit contact for LDAP card. r=mkmelin
mail/components/addrbook/content/abCard.js
mailnews/addrbook/modules/LDAPDirectoryQuery.jsm
--- a/mail/components/addrbook/content/abCard.js
+++ b/mail/components/addrbook/content/abCard.js
@@ -285,17 +285,17 @@ function OnLoadEditCard() {
         document.getElementById("PhotoType").disabled = true;
         document.getElementById("PhotoURI").disabled = true;
         document.getElementById("PhotoURI").placeholder = "";
         document.getElementById("BrowsePhoto").disabled = true;
         document.getElementById("UpdatePhoto").disabled = true;
 
         // And the phonetic fields
         document.getElementById(kPhoneticFields[0]).readOnly = true;
-        document.getElementById(kPhoneticFields[3]).readOnly = true;
+        document.getElementById(kPhoneticFields[2]).readOnly = true;
 
         // Also disable the mail format popup and allow remote content items.
         document.getElementById("PreferMailFormat").disabled = true;
 
         // And the "prefer display name" checkbox
         document.getElementById("preferDisplayName").disabled = true;
 
         document.querySelector("dialog").buttons = "accept";
--- a/mailnews/addrbook/modules/LDAPDirectoryQuery.jsm
+++ b/mailnews/addrbook/modules/LDAPDirectoryQuery.jsm
@@ -169,16 +169,17 @@ class LDAPDirectoryQuery extends LDAPLis
    * Handler of nsILDAPMessage.RES_SEARCH_ENTRY message.
    * @param {nsILDAPMessage} msg - The received LDAP message.
    */
   _onLDAPSearchEntry(msg) {
     let newCard = Cc["@mozilla.org/addressbook/cardproperty;1"].createInstance(
       Ci.nsIAbCard
     );
     this._attrMap.setCardPropertiesFromLDAPMessage(msg, newCard);
+    newCard.directoryUID = this._directory.UID;
     this._listener.onSearchFoundCard(newCard);
   }
 
   /**
    * Handler of nsILDAPMessage.RES_SEARCH_RESULT message.
    * @param {nsILDAPMessage} msg - The received LDAP message.
    */
   _onLDAPSearchResult(msg) {