mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-07-18 00:46:59 +00:00
force lower case on submit
This commit is contained in:
parent
c213fe42d2
commit
d804dda875
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
function renameDeviceAction() {
|
||||
if (editUserForm.reportValidity()) {
|
||||
renameDevice(device.id, newDeviceName)
|
||||
renameDevice(device.id, newDeviceName.toLowerCase())
|
||||
.then((response) => {
|
||||
cardEditing = false;
|
||||
// refresh users after editing
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
{:else}
|
||||
<form bind:this={editUserForm} on:submit|preventDefault={renameDeviceAction}>
|
||||
<!-- Input has to be lower case, but we will force lower case on submit -->
|
||||
<input in:slide on:click|stopPropagation bind:value={newDeviceName} class="card-input mb-1 lowercase" required pattern="[a-zA-Z\-\.]+" placeholder="name" />
|
||||
<input in:slide on:click|stopPropagation bind:value={newDeviceName} class="card-input mb-1 lowercase" required pattern="[a-zA-Z1-9\-\.]+" placeholder="name" />
|
||||
<!-- edit accept symbol -->
|
||||
<button in:fade on:click|stopPropagation class=""
|
||||
><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue