Skip to content

Commit

Permalink
add download as user type in management
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Nov 20, 2024
1 parent 3715255 commit 72d1541
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/managment/editUser.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ <h1>Editing User</h1>
<input class="form-check-input" type="radio" name="user_type" id="expert-select" value="expert">
<label class="form-check-label" for="expert-select">Expert</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="user_type" id="download-select" value="download">
<label class="form-check-label" for="download-select">Download</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="user_type" id="admin-select" value="admin">
<label class="form-check-label" for="admin-select">Admin</label>
Expand Down
4 changes: 4 additions & 0 deletions apps/managment/editUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ async function populateUserEdit(){
}
else if (user.userType == "Expert"){
document.getElementById('expert-select').checked=true;
} else if (user.userType == "Download"){
document.getElementById('download-select').checked=true;
} else {
document.getElementById('public-select').checked=true;
}
Expand Down Expand Up @@ -80,6 +82,8 @@ async function updateUser(e){
user.userType = "Admin"
} else if (document.getElementById('participant-select').checked){
user.userType = "Participant"
} else if (document.getElementById('download-select').checked){
user.userType = "Download"
} else {
user.userType = "Public"
}
Expand Down

0 comments on commit 72d1541

Please sign in to comment.