User tests: Successful: Unsuccessful:
Numerous options in the components are for numbers but the xml field type is text. This pr changes them to the correct value of number.
This ensures that a user cannot enter a letter and only numbers. There are no b/c issues as only a numerical character could ever have worked and there is no change in the way the data is stored.
I spotted this when debugging a user's site where they put "five" in the count field instead of "5" and wondered why it didnt work. After this PR that isnt possible
Category | ⇒ | Administration com_admin com_banners com_categories com_contact com_content com_fields com_finder com_messages com_modules com_newsfeeds com_redirect com_tags com_templates com_users Front End com_config |
Status | New | ⇒ | Pending |
@infograf768 I thought of that but I realised there were a few potential issues
Labels |
Added:
?
|
I have tested this item
Code review
fixed conflicts
I have tested this item
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-24 21:27:45 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Thanks
@brianteeman When the field is readonly, there is an up/down incremental control that should probably not be displayed. Perhaps revert for these fields.
That sounds like a bug in our polyfill. Testing another app I have with number fields, those controls do not come up when the field is marked readonly or disabled (and I even went so far as to turn off the CSS to test against plain browser controls).
Either way it should be created as a new issue
The controls only appear in Firefox, but not in Chrome, and Microsoft Edge on Windows 10 Home.
The problem is this line:
JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true));
It needs to use the browser conditional (IE<9). This needs to be patched in every form field layout or any form field (libraries) and also any instances in the templates
like:
JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9 '));
Semantically, it is correct that a field which can ONLY have numerical data use the number input type, regardless of whether it is editable or readonly.
Don't we need to do something similar to com_config, i.e.
and same in the other PR for modules?