User tests: Successful: Unsuccessful:
Pull Request for Issue #28883, see that for code details.
This fixes the Date of Birth field in User Profile Edit Form that generates a broken html.
The issue is to due the extra info about the date format being added with broken html around it.
The previous "hacky" HTML creates an extra control-group, and the actual "controls" is outside of it, so two problems for the price of one.
The goal was to put the info language string on a separate line but I don't think that is worth breaking the HTML structure of the form.
Now the info sits near the label and doesn't break the HTML of the control-group. It does occupy a bit more space (with the default layout) but at least the HTML is correct.
Simply see the HTML of the edit form of a user profile page with a DOB field enabled.
None
Status | New | ⇒ | Pending |
Category | ⇒ | Layout Front End Plugins |
@infograf768 I understand, but at least with this PR the HTML structure is semantically correct.
The current solution is not acceptable either, with a random empty control-group being output, and a controls that sits outside of it.
If you a better idea to fix it, please do so...
Maybe by modifying this file in another way?
5c4aa86
The ideal scenario is that, instead of outputting the info tooltip inside the control-label, it should be output inside the controls (input), possibly under it, and that would solve the problem, displaying the info in a new line, without breaking the html.
I agree with @infograf768 . If we can avoid breaking something as the result of the PR we will be better off and that is the goal of the PRs. Fix issues and not create them.
I wish I understood how to resolve but I do not.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Sorry, but I disagree with this PR.
I prefer readability to a semantically "pure" html.
Dump question do we need this text at all? Can't we use a placeholder (YYYY-MM-DD) or reduce the text to "Format: YYYY-MM-DD"
Don't we have tooltips for such help?
We could indeed modify the string.
In en-GB
; Adapt the following string to the format you entered in the 'DATE_FORMAT_CALENDAR_DATE'
PLG_USER_PROFILE_SPACER_DOB="Format: Year-Month-Day.<br /> ie 0000-00-00"
in French
; Adapt the following string to the format you entered in the 'DATE_FORMAT_CALENDAR_DATE'
PLG_USER_PROFILE_SPACER_DOB="Format : jour-mois-année.<br />Exemple 05-11-1992"
Din't we have a description text for such things?
If I remember well info was chosen instead of description in order to display a long piece of information. Was ages ago...
I would not change this now for B/C reasons (older lang packs).
code is specifying this aspect:
// Closing the opening .control-group and .control-label div so we can add our info text on own line
So what to do?
Is this addressed in j4?
Status | Ready to Commit | ⇒ | Pending |
Labels |
Added:
?
?
Removed: ? |
So what to do?
please do a new PR against 4.2 changing the place holder. In that case we might should also be able to use the laguage string for that format as provided by the TTs?
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-06-12 17:47:07 |
Closed_By | ⇒ | zero-24 |
I have tested this item✅ successfully on 5c4aa86
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28884.