good
This commit is contained in:
@@ -36,12 +36,12 @@
|
||||
<div class="space-y-md flex-grow">
|
||||
<div class="group relative flex items-center bg-surface-container-lowest border border-outline-variant rounded h-16 px-md transition-all duration-300 focused-input-glow focus-within:border-primary">
|
||||
<!-- Country Code Selector (Simulated) -->
|
||||
<button type="button" class="flex items-center gap-xs pr-md border-r border-outline-variant mr-md hover:bg-surface-container-low transition-colors h-10 rounded-sm">
|
||||
<button type="button" tabindex="-1" class="flex items-center gap-xs pr-md border-r border-outline-variant mr-md hover:bg-surface-container-low transition-colors h-10 rounded-sm">
|
||||
<span class="font-label-md text-label-md text-on-surface">+993</span>
|
||||
</button>
|
||||
|
||||
<!-- Actual Input -->
|
||||
<input id="phone-input" name="phone_visual" class="bg-transparent border-none focus:ring-0 w-full font-otp-digit text-otp-digit text-on-surface placeholder:text-outline-variant" placeholder="6X XX XX XX" type="tel" value="{{ old('phone_visual') }}"/>
|
||||
<input id="phone-input" name="phone_visual" autofocus autocomplete="tel" class="bg-transparent border-none outline-none focus:outline-none focus:ring-0 w-full font-otp-digit text-otp-digit text-on-surface placeholder:text-outline-variant" placeholder="6X XX XX XX" type="tel" value="{{ old('phone_visual') }}"/>
|
||||
<input type="hidden" name="phone" id="phone-hidden" value="{{ old('phone') }}">
|
||||
</div>
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
const hiddenInput = document.getElementById('phone-hidden');
|
||||
const form = document.getElementById('phone-form');
|
||||
|
||||
input.focus();
|
||||
|
||||
input.addEventListener('input', (e) => {
|
||||
let value = e.target.value.replace(/\D/g, '');
|
||||
// format: K X XX XX XX
|
||||
|
||||
Reference in New Issue
Block a user