mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Fixed renaming group identifier not working
This commit is contained in:
@@ -383,10 +383,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const updateButtons = document.querySelectorAll('.btn-update');
|
||||
const updateModal = document.getElementById('updateGroupModal');
|
||||
const updateForm = document.getElementById('updateGroupForm');
|
||||
|
||||
var groupId;
|
||||
updateModal.addEventListener('show.bs.modal', async event => {
|
||||
const button = event.relatedTarget;
|
||||
const groupId = button.getAttribute('data-group-id');
|
||||
groupId = button.getAttribute('data-group-id');
|
||||
|
||||
updateForm.reset();
|
||||
|
||||
@@ -441,6 +441,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
jsonData.Description.Permissions = permissions;
|
||||
jsonData.Description.DisplayName = jsonData.DisplayName;
|
||||
jsonData.DisplayName = null;
|
||||
jsonData.NewCn = jsonData.Cn;
|
||||
jsonData.Cn = groupId;
|
||||
buttons = $(`button[data-group-id=\"${jsonData.Cn}\"]`);
|
||||
buttons.each(i => buttons[i].setAttribute("data-group-id", jsonData.NewCn));
|
||||
try {
|
||||
const response = await fetch('/Groups/Update', {
|
||||
method: 'PATCH',
|
||||
|
||||
Reference in New Issue
Block a user