rbac crud
This commit is contained in:
@@ -147,25 +147,25 @@ function slideOutMessage(message) {
|
||||
//#region Feedbox
|
||||
|
||||
/**
|
||||
* feedbox({
|
||||
* title: `<span style="color:#f44336">⚠ Upload abbrechen?</span>`,
|
||||
* message: `
|
||||
* <p>Es laufen noch <b>aktive Uploads</b>.</p>
|
||||
* <p>Möchtest du wirklich <u>alle abbrechen</u>?</p>
|
||||
* `,
|
||||
* buttons: {
|
||||
* yes: {
|
||||
* text: '<b>Ja</b>, abbrechen',
|
||||
* onClick: () => stopUploadQueue()
|
||||
* },
|
||||
* no: {
|
||||
* text: 'Weiter hochladen'
|
||||
* },
|
||||
* cancel: {
|
||||
* text: 'Zurück'
|
||||
* }
|
||||
* }
|
||||
*});
|
||||
feedbox({
|
||||
title: `<span style="color:#f44336">⚠ Upload abbrechen?</span>`,
|
||||
message: `
|
||||
<p>Es laufen noch <b>aktive Uploads</b>.</p>
|
||||
<p>Möchtest du wirklich <u>alle abbrechen</u>?</p>
|
||||
`,
|
||||
buttons: {
|
||||
yes: {
|
||||
text: '<b>Ja</b>, abbrechen',
|
||||
onClick: () => stopUploadQueue()
|
||||
},
|
||||
no: {
|
||||
text: 'Weiter hochladen'
|
||||
},
|
||||
cancel: {
|
||||
text: 'Zurück'
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
function feedbox({
|
||||
title = '',
|
||||
|
||||
46
public/javascript/rbacAPI.js
Normal file
46
public/javascript/rbacAPI.js
Normal file
@@ -0,0 +1,46 @@
|
||||
function test() {
|
||||
function createInput({ id, placeholder }) {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'text';
|
||||
input.id = id;
|
||||
input.style.width = 'calc(100% - 30px)';
|
||||
input.placeholder = placeholder;
|
||||
input.required = true;
|
||||
return input;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.id = 'rbacAuthCreation';
|
||||
|
||||
container.append(
|
||||
createInput({ id: 'rbacAuthsAMAccountName', placeholder: 'sAMAccountName <Vorname.Nachname>' }),
|
||||
createInput({ id: 'rbacAuthsMail', placeholder: 'E-Mail' }),
|
||||
createInput({ id: 'rbacAuthsSn', placeholder: 'Vorname' }),
|
||||
createInput({ id: 'rbacAuthsGivenName', placeholder: 'Nachname' })
|
||||
);
|
||||
|
||||
feedbox({
|
||||
title: `<span>Erstelle eine neue Authentifizierung</span>`,
|
||||
message: container.outerHTML,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: 'Abbrechen'
|
||||
},
|
||||
yes: {
|
||||
text: '<b>Erstellen</b>',
|
||||
onClick: () => {
|
||||
fetch('/api/rbac/auths/create', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
sAMAccountName: document.getElementById('rbacAuthsAMAccountName').value,
|
||||
mail: document.getElementById('rbacAuthsMail').value,
|
||||
sn: document.getElementById('rbacAuthsSn').value,
|
||||
givenName: document.getElementById('rbacAuthsGivenName').value
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
lock: true
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user