mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
dashboard: add confirmation dialog, fix button in firefox (#2841)
This commit is contained in:
parent
f48191fe45
commit
0ee6a72c02
2 changed files with 16 additions and 2 deletions
|
@ -198,7 +198,7 @@
|
|||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td>
|
||||
<form action="{{$.WebAuthnURL}}" method="POST">
|
||||
<form action="{{$.WebAuthnURL}}" method="POST" class="delete-credential-form">
|
||||
{{$.csrfField}}
|
||||
<input type="hidden" name="action" value="unregister">
|
||||
<input type="hidden" name="pomerium_device_credential_id" value="{{.ID}}">
|
||||
|
@ -229,7 +229,7 @@
|
|||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td>
|
||||
<form action="{{$.WebAuthnURL}}" method="POST">
|
||||
<form action="{{$.WebAuthnURL}}" method="POST" class="delete-credential-form">
|
||||
{{$.csrfField}}
|
||||
<input type="hidden" name="action" value="unregister">
|
||||
<input type="hidden" name="pomerium_device_credential_id" value="{{.ID}}">
|
||||
|
@ -262,5 +262,18 @@
|
|||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
<script>
|
||||
function onDeleteDeviceCredential(evt) {
|
||||
if (!confirm("Are you sure you want to delete this device credential? If a policy requires an approved device you may need to request a new approval from your administrator.")) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
Array.from(document.getElementsByClassName("delete-credential-form")).forEach(function(el) {
|
||||
el.addEventListener("submit", onDeleteDeviceCredential);
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
{{end}}
|
||||
|
|
|
@ -488,6 +488,7 @@ a.button {
|
|||
display: inline-block;
|
||||
text-decoration: none;
|
||||
text-transform: none;
|
||||
white-space: nowrap;
|
||||
transition: box-shadow 150ms ease-in-out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue