This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
101 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 47 additions & 51 deletions
98
src/webportal/src/app/user/fabric/userView/user-edit-modal-component.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,53 @@ | ||
<!-- Modal --> | ||
<div id="userEditModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title">Edit information of <%= username %></h4> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="box-header with-border user-edit-border"> | ||
<h3 class="box-title">Change Userinfo</h3> | ||
</div> | ||
<form id="form-update-account" class="form-register" onsubmit="updateUserAccount('<%= username %>'); return false;"> | ||
<label for="inputPassword" class="sr-only">Password</label> | ||
<input type="password" name="password" id="update-account-input-password" class="form-control" placeholder="******"> | ||
<div class="checkbox"> | ||
<label> | ||
<% if (isAdmin === 'true') { %> | ||
<input type="checkbox" name="admin" checked="checked" >Admin user</label> | ||
<% } else { %> | ||
<input type="checkbox" name="admin">Admin user</label> | ||
<% } %> | ||
</div> | ||
<button class="btn btn-lg btn-primary btn-block" type="button" onclick="updateUserAccount('<%= username %>')">Change Userinfo</button> | ||
</form> | ||
<% if (isAdmin !== 'true') { %> | ||
<div class="box-header with-border user-edit-border"> | ||
<h3 class="box-title">Update Virtual Clusters</h3> | ||
</div> | ||
<form id="form-update-virtual-cluster" class="form-register" onsubmit="updateUserVc('<%= username %>'); return false;"> | ||
<label for="inputVirtualCluster" class="sr-only">VirtualCluster</label> | ||
<input type="text" name="virtualCluster" id="update-virtual-cluster-input-virtualCluster" class="form-control" | ||
placeholder="Virtual Clusters (e.g. vc1,vc2)" value=<%= vcList %>> | ||
<button class="btn btn-lg btn-primary btn-block" type="button" onclick="updateUserVc('<%= username %>')"> Update Virtual Clusters</button> | ||
</form> | ||
<% } %> | ||
<div class="box-header with-border user-edit-border"> | ||
<h3 class="box-title">Update Github PAT</h3> | ||
</div> | ||
<form id="form-update-github-token" class="form-register" onsubmit="updateUserGithubPAT('<%= username %>'); return false;"> | ||
<label for="inputGithubPAT" class="sr-only">GithubPAT</label> | ||
<input type="text" name="githubPAT" id="update-github-token-input-githubPAT" class="form-control" | ||
placeholder= | ||
<% if (hasGithubPAT === 'true') { %> | ||
"******" | ||
<% } else { %> | ||
"N/A" | ||
<% } %> | ||
> | ||
<button class="btn btn-lg btn-primary btn-block" type="button" onclick="updateUserGithubPAT('<%= username %>')">Update Github PAT</button> | ||
</form> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title">Edit information of <%= username %></h4> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="box-header with-border user-edit-border"> | ||
<h3 class="box-title">Change Userinfo</h3> | ||
</div> | ||
<form id="form-update-account" class="form-register" onsubmit="updateUserAccount('<%= username %>'); return false;"> | ||
<label for="inputPassword" class="sr-only">Password</label> | ||
<input type="password" name="password" id="update-account-input-password" class="form-control" placeholder="******"> | ||
<div class="checkbox"> | ||
<label> | ||
<% if (isAdmin === 'true') { %> | ||
<input type="checkbox" name="admin" checked="checked" >Admin user</label> | ||
<% } else { %> | ||
<input type="checkbox" name="admin">Admin user</label> | ||
<% } %> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button class="btn btn-lg btn-primary btn-block" type="button" onclick="updateUserAccount('<%= username %>')">Change Userinfo</button> | ||
</form> | ||
<% if (isAdmin !== 'true') { %> | ||
<div class="box-header with-border user-edit-border"> | ||
<h3 class="box-title">Update Virtual Clusters</h3> | ||
</div> | ||
<form id="form-update-virtual-cluster" class="form-register" onsubmit="updateUserVc('<%= username %>'); return false;"> | ||
<label for="inputVirtualCluster" class="sr-only">VirtualCluster</label> | ||
<input type="text" name="virtualCluster" id="update-virtual-cluster-input-virtualCluster" class="form-control" | ||
placeholder="Virtual Clusters (e.g. vc1,vc2)" value=<%= vcList %>> | ||
<button class="btn btn-lg btn-primary btn-block" type="button" onclick="updateUserVc('<%= username %>')"> Update Virtual Clusters</button> | ||
</form> | ||
<% } %> | ||
<div class="box-header with-border user-edit-border"> | ||
<h3 class="box-title">Update Github PAT</h3> | ||
</div> | ||
<form id="form-update-github-token" class="form-register" onsubmit="updateUserGithubPAT('<%= username %>'); return false;"> | ||
<label for="inputGithubPAT" class="sr-only">GithubPAT</label> | ||
<input type="text" name="githubPAT" id="update-github-token-input-githubPAT" class="form-control" | ||
placeholder= | ||
<% if (hasGithubPAT === 'true') { %> | ||
"******" | ||
<% } else { %> | ||
"N/A" | ||
<% } %> | ||
> | ||
<button class="btn btn-lg btn-primary btn-block" type="button" onclick="updateUserGithubPAT('<%= username %>')">Update Github PAT</button> | ||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" onclick="hideEditUser()">Close</button> | ||
</div> | ||
</div> |