?
avatar AndySDH
AndySDH
30 Apr 2020

I noticed the Date of Birth field in User Profile Edit Form generates a broken html.

The issue is to due the extra info about the date format being added with broken html around it.

Might be related to this: #7345

Expected result

It should generate something like this (like all the other fields):

<div class="control-group">
    <div class="control-label">
            // Label here
    </div>
    <div class="controls">
            // Calendar Input here
            <span>The date of birth entered should use the format Year-Month-Day, ie 0000-00-00</span>
    </div>
</div>

Actual result

Instead it generates a clearly broken HTML like this:

<div class="control-group">
    <div class="control-label">
    </div>
</div>
<div class="controls">The date of birth entered should use the format Year-Month-Day, ie 0000-00-00</div>
<div class="control-group">
    <div class="control-label">
      // Label here
    </div>
    <div class="controls">
      // Calendar Input here
    </div>
</div>

As you can see it creates an extra control-group, and the actual "controls" is outside of it, so two problems for the price of one.

Should be an easy fix probably but not sure in which file to look, couldn't find it.

avatar AndySDH AndySDH - open - 30 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar SharkyKZ
SharkyKZ - comment - 30 Apr 2020

// Closing the opening .control-group and .control-label div so we can add our info text on own line ?>

This is done on purpose but it looks very hacky. Maybe there's a better way.

avatar AndySDH
AndySDH - comment - 30 Apr 2020

Oh nice job for finding the culprit file! I will see to come up with a better solution for it and open a PR.

avatar AndySDH AndySDH - change - 30 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-30 14:24:16
Closed_By AndySDH
avatar AndySDH AndySDH - close - 30 Apr 2020
avatar AndySDH
AndySDH - comment - 30 Apr 2020

See pull request #28884

Add a Comment

Login with GitHub to post a comment