sync changes
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"anonymousSubmission": false,
|
||||
"form": {
|
||||
"description": {
|
||||
"type": "span",
|
||||
"content": "Important: <ul> <li>Your Enstrayed Cloud quota does NOT affect your EOES mailbox quota.</li> <li>Your request will be reviewed and may be denied for any reason.</li> </ul>"
|
||||
},
|
||||
"newquota": {
|
||||
"type": "text",
|
||||
"content": "New quota (in GB)",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,6 @@
|
||||
"type": "text",
|
||||
"content": "What is your name?"
|
||||
},
|
||||
"email": {
|
||||
"type": "text",
|
||||
"content": "What is a good email address to reach you at?"
|
||||
},
|
||||
"message": {
|
||||
"type": "bigtext",
|
||||
"content": "Please enter your message below."
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
"general_techsupport": "General Technical Support",
|
||||
"ecls_deleteaccount": "ECLS: Delete Account",
|
||||
"ecls_passwordreset": "ECLS: Password Reset",
|
||||
"ecls_personalinfochange": "ECLS: Personal Information Change",
|
||||
"enstrayedcloud_quotachange": "Enstrayed Cloud: Quota Change"
|
||||
"ecls_personalinfochange": "ECLS: Personal Information Change"
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
# Using App Passwords on Enstrayed Cloud
|
||||
|
||||
App Passwords are credentials used to access your Enstrayed Cloud account from a specific application or device. They are created automatically for many Nextcloud clients, or can be created manually using the steps below.
|
||||
|
||||
**As Enstrayed Cloud exclusively uses ECLS for sign on, you will need to create app passwords for any device that does not support browser login.**
|
||||
|
||||
To create an App Password:
|
||||
|
||||
1. Login to Enstrayed Cloud
|
||||
2. Select your profile image in the top right of the page and select 'Personal Settings'<br>
|
||||

|
||||
3. In the sidebar on the left side of the page, select 'Security'<br>
|
||||

|
||||
4. Enter a description for the app password, such as the device name or application, then select 'Create new app password'<br>
|
||||

|
||||
5. You will be presented with a username and unique password; You will use these credentials to access Enstrayed Cloud from your application.<br>
|
||||

|
||||
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>example article</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -57,23 +57,8 @@ body {
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
.articlecontent {
|
||||
background-color: #fff;
|
||||
padding: 2em;
|
||||
margin: 2em 0 2em;
|
||||
max-width: 100ch;
|
||||
}
|
||||
|
||||
.articlecontent > h1 {
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
|
||||
.articlecontent > ol > li {
|
||||
margin: 0 0 0.2em;
|
||||
}
|
||||
|
||||
.articlecontent img {
|
||||
max-width: 100%;
|
||||
.helpdeskScopeOnly {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.linkColumn {
|
||||
@@ -107,3 +92,30 @@ dialog::backdrop {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#formarea > div > input {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#formarea > div > textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Article Specific */
|
||||
.articlecontent {
|
||||
background-color: #fff;
|
||||
padding: 2em;
|
||||
margin: 2em 0 2em;
|
||||
max-width: 100ch;
|
||||
}
|
||||
|
||||
.articlecontent > h1 {
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
|
||||
.articlecontent > ol > li {
|
||||
margin: 0 0 0.2em;
|
||||
}
|
||||
|
||||
.articlecontent img {
|
||||
max-width: 100%;
|
||||
}
|
||||
@@ -12,6 +12,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
if (jsonRes.loggedIn) {
|
||||
globalLoggedIn = true
|
||||
document.getElementById("loginButton").innerText = `Logout ${jsonRes.username}`
|
||||
|
||||
if (jsonRes.scopes.includes("helpdesk")) {
|
||||
let targetElements = document.getElementsByClassName("helpdeskScopeOnly")
|
||||
// cant do a for loop since targetElements dynamically updates, this is easier but stupid
|
||||
while (targetElements.length > 0) {
|
||||
targetElements[0].classList.toggle("helpdeskScopeOnly")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
globalLoggedIn = false
|
||||
document.getElementById("loginButton").innerText = `Login`
|
||||
@@ -24,8 +32,7 @@ function loginFunction() {
|
||||
if (globalLoggedIn === true) {
|
||||
fetch(`/api/auth/logout`).then(fetchRes => {
|
||||
if (fetchRes.status === 200) {
|
||||
globalLoggedIn = false
|
||||
document.getElementById("loginButton").innerText = `Login`
|
||||
location.reload()
|
||||
} else {
|
||||
fetchRes.text().then(textRes => {
|
||||
useGlobalDialog("Error", `An error occurred during logout: ${textRes}`)
|
||||
@@ -41,6 +48,13 @@ function loginFunction() {
|
||||
if (jsonRes.loggedIn) {
|
||||
globalLoggedIn = true
|
||||
document.getElementById("loginButton").innerText = `Logout ${jsonRes.username}`
|
||||
|
||||
if (jsonRes.scopes.includes("helpdesk")) {
|
||||
let targetElements = document.getElementsByClassName("helpdeskScopeOnly")
|
||||
while (targetElements.length > 0) {
|
||||
targetElements[0].classList.toggle("helpdeskScopeOnly")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
useGlobalDialog("Error", `You are not logged in. Please try logging in again.`)
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<body>
|
||||
|
||||
<div class="headerbar">
|
||||
<h1>Enstrayed Helpdesk</h1>
|
||||
<a href="/helpdesk/ticket/new">Open Ticket</a>
|
||||
<a href="/helpdesk" class="headerbarTitle">Enstrayed Helpdesk</a>
|
||||
<a href="/helpdesk/ticket/new">New Request</a>
|
||||
<a href="/helpdesk/articles">Knowledgebase</a>
|
||||
|
||||
<div class="headerbarright">
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
|
||||
<div class="headerbar">
|
||||
<a href="/helpdesk" class="headerbarTitle">Enstrayed Helpdesk</a>
|
||||
<a href="/helpdesk/ticket/new">Open Ticket</a>
|
||||
<a href="/helpdesk/ticket/new">New Request</a>
|
||||
<a href="/helpdesk/articles">Knowledgebase</a>
|
||||
<a href="/helpdesk/ticket/list" class="helpdeskScopeOnly">Ticket List</a>
|
||||
|
||||
<div class="headerbarright">
|
||||
<button id="loginButton" onclick="loginFunction()">Login</button>
|
||||
|
||||
@@ -9,11 +9,9 @@
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('formSelection').value = 'none'
|
||||
document.getElementById('formSelection').addEventListener('change', function() {
|
||||
useGlobalDialog(`Info`, `You selected ${this.value}`)
|
||||
})
|
||||
|
||||
|
||||
fetch(`/api/helpdesk/forms/manifest.json`).then(fetchRes => {
|
||||
fetch(`/api/helpdesk/forms/manifest`).then(fetchRes => {
|
||||
fetchRes.json().then(jsonRes => {
|
||||
for (let x in jsonRes) {
|
||||
let newElement = document.createElement('option')
|
||||
@@ -23,6 +21,33 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
document.getElementById('formSelection').addEventListener('change', function() {
|
||||
document.getElementById("formarea").innerHTML = ""
|
||||
fetch(`/api/helpdesk/forms/${this.value}`).then(fetchRes => {
|
||||
fetchRes.json().then(jsonRes => {
|
||||
for (x in jsonRes.form) {
|
||||
let newElem
|
||||
switch (jsonRes.form[x].type) {
|
||||
case "text":
|
||||
newElem = document.createElement('div')
|
||||
newElem.innerHTML = `<label for="${"formarea_"+x}">${jsonRes.form[x].content}</label><br><input type="text" id="${"formarea_"+x}">`
|
||||
|
||||
document.getElementById("formarea").appendChild(newElem)
|
||||
break;
|
||||
|
||||
case "bigtext":
|
||||
newElem = document.createElement('div')
|
||||
newElem.innerHTML = `<label for="${"formarea_"+x}">${jsonRes.form[x].content}</label><br><textarea id="${"formarea_"+x}" ></textarea>`
|
||||
|
||||
document.getElementById("formarea").appendChild(newElem)
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
@@ -30,23 +55,31 @@
|
||||
|
||||
<div class="headerbar">
|
||||
<a href="/helpdesk" class="headerbarTitle">Enstrayed Helpdesk</a>
|
||||
<a>Open Ticket</a>
|
||||
<a>New Request</a>
|
||||
<a href="/helpdesk/articles">Knowledgebase</a>
|
||||
|
||||
<div class="headerbarright">
|
||||
<button id="loginButton" onclick="loginFunction()">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="newticketmaincontent">
|
||||
<h2>New Ticket</h2>
|
||||
<label for="formSelection">Please select a form: </label>
|
||||
<select name="Form Selection" id="formSelection">
|
||||
<option value="none" disabled selected>-- Choose From List --</option>
|
||||
</select>
|
||||
<h2>New Request</h2>
|
||||
<div>
|
||||
<label for="formSelection">Please select a form: </label>
|
||||
<select name="Form Selection" id="formSelection">
|
||||
<option value="none" disabled selected>-- Choose From List --</option>
|
||||
</select>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div id="formarea">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dialog id="globalDialog">
|
||||
<h2 id="globalDialogHeader">Warning</h2>
|
||||
<p id="globalDialogText">This is a warning</p>
|
||||
|
||||
Reference in New Issue
Block a user