From 4698351e58c0038c2e0186b60610cd5e041b6892 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sun, 14 Dec 2025 08:18:51 +0545 Subject: [PATCH] feat(clients/partials): improve client form functionality and validation Enhancements to the client form include phone number validation and interface improvements. The short code field is now auto-generated and disabled, while the phone input uses a proper widget with real-time validation. **New Features** - Added **Phone Number Validation** using libphonenumber-js with real-time feedback - Implemented **Phone Input Widget** with country code selection **Enhancements & Refinements** - **Short Code Field** changed to read-only with "Auto-generated" placeholder - Updated form styling for **Phone Input** using `join` container class - Added phone validation script to automatically highlight valid/invalid entries **Bug Fixes** - Fixed potential inconsistency in phone number handling by replacing manual input with proper form widget --- templates/clients/partials/client_form.html | 40 ++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/templates/clients/partials/client_form.html b/templates/clients/partials/client_form.html index 83586e4..d3ceb57 100644 --- a/templates/clients/partials/client_form.html +++ b/templates/clients/partials/client_form.html @@ -72,7 +72,8 @@
+ value="{{ form.short_code.value|default:'' }}" class="input w-full bg-base-200" + placeholder="Auto-generated" disabled /> {% if form.short_code.errors %}

{{ form.short_code.errors.0 }}

{% endif %} @@ -106,9 +107,9 @@
- - +
+ {{ form.phone }} +
{% if form.phone.errors %}

{{ form.phone.errors.0 }}

{% endif %} @@ -150,11 +151,42 @@
+