feat: always display country code in uppercase (model validates + oninput)

This commit is contained in:
2026-07-05 21:22:57 +08:00
parent 08684493f4
commit 2bd914532e
3 changed files with 8 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
<label>收件人 *</label>
<input type="text" name="recipient_name" id="input-recipient" value="{{ postcard.recipient_name if postcard else '' }}">
<label>国家/地区 *</label>
<input type="text" name="country" id="input-country" value="{{ postcard.country if postcard else '' }}" maxlength="2" placeholder="JP" style="width:80px;text-transform:uppercase">
<input type="text" name="country" id="input-country" value="{{ postcard.country if postcard else '' }}" maxlength="2" placeholder="JP" style="width:80px;text-transform:uppercase" oninput="this.value=this.value.toUpperCase()">
<label>寄出时间 *</label>
<input type="date" name="send_time" id="input-send-time" value="{{ postcard.send_time.strftime('%Y-%m-%d') if postcard and postcard.send_time else '' }}">
<label id="label-arrival">到达时间</label>