From f812b8757689edf7a3c1f2751bbd106196e9fafb Mon Sep 17 00:00:00 2001 From: Marc Hefter Date: Sun, 26 Feb 2023 20:15:01 +0100 Subject: handling updateProfile with array of values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit using an array to buffer profile updates, like suggested by @come-nc clean some code and remove unneccessary redundancy added the Fediverse profile property Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter --- apps/user_ldap/js/wizard/wizardTabAdvanced.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'apps/user_ldap/js') diff --git a/apps/user_ldap/js/wizard/wizardTabAdvanced.js b/apps/user_ldap/js/wizard/wizardTabAdvanced.js index 031f2bf2a9d..170625ce896 100644 --- a/apps/user_ldap/js/wizard/wizardTabAdvanced.js +++ b/apps/user_ldap/js/wizard/wizardTabAdvanced.js @@ -159,6 +159,10 @@ OCA = OCA || {}; $element: $('#ldap_attr_biography'), setMethod: 'setBiographyAttribute' }, + ldap_attr_fediverse: { + $element: $('#ldap_attr_fediverse'), + setMethod: 'setFediverseAttribute' + }, ldap_profile_scope: { $element: $('#ldap_profile_scope'), setMethod: 'setProfileScope' @@ -476,6 +480,15 @@ OCA = OCA || {}; this.setElementValue(this.managedItems.ldap_attr_biography.$element, attribute); }, + /** + * sets the attribute for the Nextcloud user profile fediverse + * + * @param {string} attribute + */ + setFediverseAttribute: function(attribute) { + this.setElementValue(this.managedItems.ldap_attr_fediverse.$element, attribute); + }, + /** * sets the visibility scope for the Nextcloud user profile properties * -- cgit v1.2.3