refactoring

This commit is contained in:
Roland Gruber 2024-01-04 07:49:38 +01:00
parent a93ebbbef5
commit c8dbbcf3f8
2 changed files with 6 additions and 4 deletions

View file

@ -8,7 +8,7 @@ use LAM\TYPES\ConfiguredType;
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2006 Tilo Lutz 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 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 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(); const data = await response.json();
if (data.success) { if (data.success) {
if (data.html) { if (data.html) {
jQuery(\'#inetOrgPersonPhotoUploadContent\').html(data.html); document.getElementById(\'inetOrgPersonPhotoUploadContent\').innerHTML = data.html;
window.lam.tools.webcam.init(); window.lam.tools.webcam.init();
window.lam.html.initCropping();
} }
} }
else if (data.error) { else if (data.error) {

View file

@ -1,7 +1,7 @@
/** /**
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) 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 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 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(); const jsonData = await response.json();
if (jsonData.success) { if (jsonData.success) {
if (jsonData.html) { if (jsonData.html) {
jQuery('#' + contentId).html(jsonData.html); document.getElementById(contentId).innerHTML = jsonData.html;
window.lam.tools.webcam.init(); window.lam.tools.webcam.init();
window.lam.html.initCropping();
} }
} }
else if (jsonData.error) { else if (jsonData.error) {