User tests: Successful: Unsuccessful:
If you deactivate the date of birth in the profile plugin, the info text is still visible. (The date of birth entered should use the format Year-Month-Day, i.e. 0000-00-00)
Labels |
Added:
?
?
|
Labels |
Added:
?
Removed: ? |
I wonder if there isn't a better way to show that message than having a spacer. It caused all sorts of problems lately and is a hacky solution anyway.
It ends up with code like this PR which has hardcoded fieldnames in places where they never should be.
This pull request is just a quick fix for the next version, because this bug ist just annoying ;)
But yeah, I agree, this plugin has some concept issues
(what sense makes e.g. $form->setFieldAttribute('spacer', 'type', 'spacer', 'profile');)
I believe a better solution is to edit the file components\com_users\views\profile\tmpl\edit.php and change line 63 to:
<?php if ($field->type != 'Spacer') : ?>
<?php echo $field->label; ?>
<?php endif; ?>
Let me know if you want me to make a PR for this or if you will update your existing one.
This does not solve the problem we have here:
Your suggestion tackles an other problem (perhaps for a new pull request?)
Imho, the spacer text should be generated in the same formfield as the "date of birth". It shouldn't be two formfields. That would be the most elegant solution and should be possible using a custom formfield I think.
If it needs to be two formfields, the naming should be so we can disable both. Even for third parties additional fields (3rd party) doing the same.
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-08-12 09:36:02 |
I kind of remember there was a proposal to let display or not a field depending on the display of another
Do you mean the "showon" feature? I think that only works in the configuration views.
I have an idea how it could be solved but need to try first. Will make a PR if I find a solution
Show on was generalised to be available in all JForm objects for 3.3 i think (not 100% though - there was definitely a PR)
Only for those places which use the JLayout to render the labels. Which in this case isn't the case (at least in FE where I checked).
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34021&start=0