? Success

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
31 Jul 2014

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)

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar bembelimen bembelimen - open - 31 Jul 2014
avatar bembelimen bembelimen - change - 31 Jul 2014
Labels Added: ? ?
avatar chmst
chmst - comment - 31 Jul 2014

@test - works. the embarassing comment is removed if the dob field is deactivated

avatar brianteeman brianteeman - change - 31 Jul 2014
Labels Added: ?
Removed: ?
avatar Bakual
Bakual - comment - 31 Jul 2014

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.

avatar bembelimen
bembelimen - comment - 31 Jul 2014

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');)

avatar roland-d
roland-d - comment - 1 Aug 2014

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.

avatar bembelimen
bembelimen - comment - 1 Aug 2014

This does not solve the problem we have here:

  • If the dob is shown, the information text (a spacer) should also be shown
  • If the dob is not shown, the information text should be hidden, too

Your suggestion tackles an other problem (perhaps for a new pull request?)

avatar Bakual
Bakual - comment - 1 Aug 2014

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.

avatar brianteeman brianteeman - change - 8 Aug 2014
Labels Added: ?
avatar infograf768
infograf768 - comment - 12 Aug 2014

@Bakual
As we have no other solution for now (I kind of remember there was a proposal to let display or not a field depending on the display of another), let's merge this.

avatar infograf768 infograf768 - change - 12 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-12 09:36:02
avatar infograf768 infograf768 - close - 12 Aug 2014
avatar Bakual
Bakual - comment - 12 Aug 2014

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 :smile:

avatar wilsonge
wilsonge - comment - 12 Aug 2014

Show on was generalised to be available in all JForm objects for 3.3 i think (not 100% though - there was definitely a PR)

avatar Bakual
Bakual - comment - 13 Aug 2014

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).

avatar typeii8 typeii8 - test_item - 10 Feb 2015 - Tested successfully

Add a Comment

Login with GitHub to post a comment