yesno element shows an empty field on a form

burghard

Member
I updated from GitHub last weekend to fix an issue with the page links on the content. I use the purity III template with the Fabrik Jlayouts.

Now the yens fields are rendered as empty fields (yesno field rendered in a form.png). When moused over, a grey area is shown partly in the field (yesno field fendered with mouseover in a form.png ).
It can not be recognised, which value the underlying column has. There is no visible response to a click action anymore.

The yesno fields are rendered correctly in a details form (no edit)
Is there any change with the yesno button?
 
Last edited:
Hmmm, no, we haven't changed anything, but the T3 framework has. Looks like they now make an assumption in their code that the label for the radio button input comes after the input, not before, when they convert a two button btn-group to a yes/no ('t3onoff').

I'm working on adding a layout override for T3.

-- hugh
 
OK, I can't work round this with a change of layout on our end.

I've raised an issue and submitted a fix as a PR on their T3 github repo:

https://github.com/t3framework/t3/pull/515

Until they (hopefully) merge the PR, all you can do is try and fold my fix into your copy of T3. It'll work in debug mode with the uncompressed files, but I've no idea how to build a compressed set with the change.

-- hugh
 
So basically, they assume a layout of ...

Code:
<input id="foo" ...>
<label for="foo" ...>The Label</label>

... whereas we do ...

Code:
<label for="foo" ...>
   <input id="foo" ...>
   The Label
</label>

The change I submitted tweaks it to actually use the "for" property of the label, rather than using $label.prev() to get the input.

-- hugh
 
See my previous post, with link to the pull request on the T3 github repo.



Sent from my HTC6545LVW using Tapatalk
 
So to summarize, I've fixed it, but the fix has to be in the T3 code. And all I can do is submit a PR. If you feel like responding on the associated issue, referenced in the PR, that might help. Squeaky wheels and all that.


Sent from my HTC6545LVW using Tapatalk
 
Unfortunately it is not public. It is a members portal for a club. Should I setup a small example on another site? This would be possible for me.
 
I thought it is a simple thing to publish a form on my site with two elements (email and a yesno). But I get js errors. I will post it separately here in this forum.
 
I disabled the plugin which causes the js error. Now the form is displayed... but.. with a correctly rendered yesno. I did NOT patch the T3 with your patch for this site. What did I wrong? :)
 
It's not loading their frontend-edit.js for some reason.

I'll see if I can figure out what controls whether that gets loaded.

-- hugh
 
OK, I think that file only gets included if the user can edit modules or content on the frontend.

Here's the rather interesting condition that controls whether they include that file on the front end ...

Code:
        $frontedit  = in_array($input->getCmd('option'), array('com_media', 'com_config'))    //com_media or com_config
            || in_array($input->getCmd('layout'), array('edit'))                                //edit layout
            || (version_compare(JVERSION, '3.2', 'ge') && $user->id && $app->get('frontediting', 1) &&
                ($user->authorise('core.edit', 'com_modules') || $user->authorise('core.edit', 'com_menus')));    //frontediting

So try logging in on the front end with an admin.

-- hugh
 
I found the same. We worked in parallel. I that frontend-edit.js is rendered only in some condition. One of them is, that the frontend-editing on and the user is permitted to frontend-edit modules and/or menus. But I do not want to let everybody edit my modules or menus only site.
Two others conditions are unclear to me (something with com_media, com_config or layout edit). They are all tested in line 848 ff of /plugins/system/t3/includes/core/template.php.
All seem NOT to be true for the for the actual situation.

But I set this condition to true for testing reasons ? e voila!
I will now make a followup on your post :)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top