? Pending

User tests: Successful: Unsuccessful:

avatar venomdev
venomdev
15 Dec 2020
  • Move closing div tag to end of HTML output
  • Add p tags to the field description

Pull Request for Issue #31657

avatar venomdev venomdev - open - 15 Dec 2020
avatar venomdev venomdev - change - 15 Dec 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2020
Category Libraries
avatar gostn
gostn - comment - 15 Dec 2020

@venomdev you can close #31657. It don“t need an issue if a pr is created.

avatar venomdev
venomdev - comment - 15 Dec 2020

No worries, I created the issue first and decided to fix it myself.

avatar brianteeman
brianteeman - comment - 15 Dec 2020

Thanks for your fisrt contributuion. Unfortunately it doesnt work. When tested on the note field in the tinymce editor plugin we can see the problem.

Before this PR

image
`

After this PR

image

avatar venomdev
venomdev - comment - 15 Dec 2020

Wouldn't that mean the tiny MCE has an error?

The field is now valid html

avatar Fedik
Fedik - comment - 15 Dec 2020

I cannot reproduce your issue, with note field I have markup:

<div class="control-group">
  <div class="control-label">
  </div><div ><h4>test</h4></div>
  <div class="controls">
  </div>
</div>

The closing div inside the filed is hacky way to make the note full width: close previous div, and reopen it after the note again.
Changes in this PR break it.

avatar venomdev
venomdev - comment - 15 Dec 2020

The closing div inside the filed is hacky way to make the note full width: close previous div, and reopen it after the note again.

That makes sense for how it currently works. I'm using these fields on the front end in a twig template and they aren't wrapped in the usual divs for admin pages. Looks like I'll need to create a custom note form field.

Something to consider for an update on this field, would it be possible to add an attribute that defaults to the current output and when the attribute is set switches to the stand alone html?

Currently I'm thinking something like

html=strict (standard valid html)

Or

html=wrapped (set by default)

avatar Fedik
Fedik - comment - 16 Dec 2020

Do not need any extra attributes, there already layout attribute, that allows to use a custom markup.
However the Note field does not support it currently. The solution would be is to make support a custom layout in this field.

avatar venomdev
venomdev - comment - 16 Dec 2020

@Fedik Ok, yeah a layout file looks the way to go, I didn't know these existed for fields.

I'll work on that when I get a chance, I still needed to create a custom field for now.

avatar venomdev venomdev - change - 18 Dec 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-12-18 04:17:28
Closed_By venomdev
Labels Added: ?
avatar venomdev venomdev - close - 18 Dec 2020

Add a Comment

Login with GitHub to post a comment