 <!-- Modal for showing generated password to the admin / Global Admin -->
 <div class="modal fade" id="passwordPopupModel" tabindex="-1" role="dialog" aria-labelledby="passwordPopupModelLabel"
 aria-hidden="true">
 <div class="modal-dialog" role="document">
	 <div class="modal-content">
		 <div class="modal-header">
			 <h5 class="modal-title" id="passwordPopupModelLabel">Generated New Password for the User</h5>
		 </div>
		 <div class="modal-body">
			 <input type="text" name="" id="passwordInput" readonly style="width: 50%; margin: auto;"> <br>
		 </div>
		 <div class="modal-footer">
			 <button type="button" id="copyPassword" data-dismiss="modal" class="btn btn-primary">Copy </button>
		 </div>
	 </div>
 </div>
</div>
<div class="row">
<!-- begin col-12 -->
<div class="col-12 ui-sortable">
 <!-- begin panel -->
	 <div class="panel panel-inverse" data-sortable-id="form-stuff-5">
		 <div class="panel-body">
			 <a style="height:35px; float: right;" id="add_btn" class="btn btn-primary m-r-5 m-b-5"
				 type="button" >
				 Add User
			 </a>
			 <form class="form-horizontal">
				 <table id="users" class="table table-striped table-bordered"  width="100%" cellspacing="0">
				 <thead>
				 <tr>
					 <th id="emailOrAdIdHeader"></th>
					 <th>Created On</th>
					 <th>Modified On</th>
					 <th>Role</th>
					 <th>Change Role</th>
					 <th>Revoke Role</th>
					 <th>Status</th>
					 <th>Status</th>
					 <th>Reset Password</th>
					 <th>Unblock</th>
					 <th>Delete User</th>
				 </tr>
					</thead>        
				 </table>	
			 </form>
		 </div>	
	 </div>
 </div>
</div>	

<style>

/* Enable word wrapping for cells in the "email" and "username" columns */
#users td:nth-child(1),
#users td:nth-child(2) {
 white-space: normal;
 word-wrap: break-word;
}

/* Style for email cells */
#users td:nth-child(1) span {
 display: inline-block;
 max-width: 100%;
 overflow: hidden;
 text-overflow: ellipsis;
}

</style>
<script  nonce="<%=nonce%>">

	 $("#add_btn").click(function(){
		 addUser();
	 });
	 function addUser() {
		 window.location.href = encodeURI("<%= cdnUrl %>/dashboard?action=addusers")		
	 }
	 
	 $("#copyPassword").click(function(){
	   /* Get the text field */
	   var copyText = document.getElementById("passwordInput");						
		/* Copy the text inside the text field */
	   navigator.clipboard.writeText(copyText.value);
	 });
	 
 </script>
