From c8dbbcf3f89093cedadd42ed2238583e6317b6a2 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 4 Jan 2024 07:49:38 +0100 Subject: [PATCH] refactoring --- lam/lib/modules/inetOrgPerson.inc | 5 +++-- lam/templates/lib/500_lam.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index eed0412c4..447b345d4 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -8,7 +8,7 @@ use LAM\TYPES\ConfiguredType; This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2005 - 2023 Roland Gruber + 2005 - 2024 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2957,8 +2957,9 @@ class inetOrgPerson extends baseModule implements passwordService,AccountStatusP const data = await response.json(); if (data.success) { if (data.html) { - jQuery(\'#inetOrgPersonPhotoUploadContent\').html(data.html); + document.getElementById(\'inetOrgPersonPhotoUploadContent\').innerHTML = data.html; window.lam.tools.webcam.init(); + window.lam.html.initCropping(); } } else if (data.error) { diff --git a/lam/templates/lib/500_lam.js b/lam/templates/lib/500_lam.js index 645a350b9..362c55f35 100644 --- a/lam/templates/lib/500_lam.js +++ b/lam/templates/lib/500_lam.js @@ -1,7 +1,7 @@ /** This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2023 Roland Gruber + Copyright (C) 2003 - 2024 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1393,8 +1393,9 @@ window.lam.tools.webcam.uploadSelfService = function(event, tokenName, tokenValu const jsonData = await response.json(); if (jsonData.success) { if (jsonData.html) { - jQuery('#' + contentId).html(jsonData.html); + document.getElementById(contentId).innerHTML = jsonData.html; window.lam.tools.webcam.init(); + window.lam.html.initCropping(); } } else if (jsonData.error) {