misc: fix inputmode attribute value to be "numeric" (#45229)

This commit is contained in:
Frédéric Péters 2020-07-17 12:18:24 +02:00
parent ae4ce9768b
commit 1d78d7cf02
2 changed files with 5 additions and 5 deletions

View File

@ -690,7 +690,7 @@ def test_wcsextrastringwidget_builtin_validation():
# and check it gets a special HTML inputmode
widget = WcsExtraStringWidget('test', value='foo', required=False)
widget.field = fakefield
assert 'inputmode="number"' in str(widget.render())
assert 'inputmode="numeric"' in str(widget.render())
widget = WcsExtraStringWidget('test', value='foo', required=False)
widget.field = fakefield

View File

@ -955,7 +955,7 @@ class ValidationWidget(CompositeWidget):
('digits', {
'title': N_('Digits'),
'regex': r'\d+',
'html_inputmode': 'number'}
'html_inputmode': 'numeric'}
),
('phone', {
'title': N_('Phone Number'),
@ -970,17 +970,17 @@ class ValidationWidget(CompositeWidget):
('zipcode-fr', {
'title': N_('Zip Code (France)'),
'regex': r'\d{5}',
'html_inputmode': 'number'}
'html_inputmode': 'numeric'}
),
('siren-fr', {
'title': N_('SIREN Code (France)'),
'function': 'validate_siren',
'html_inputmode': 'number'}
'html_inputmode': 'numeric'}
),
('siret-fr', {
'title': N_('SIRET Code (France)'),
'function': 'validate_siret',
'html_inputmode': 'number'}
'html_inputmode': 'numeric'}
),
('nir-fr', {
'title': N_('NIR (France)'),