As the topic suggests if you have more than one field the Javascript conditional doesn't work at all on the second field in the list.

I'll need to write a test for this.

Comments

mradcliffe’s picture

Status: Active » Needs review
Issue tags: -Needs tests
StatusFileSize
new4.33 KB

Probably won't be able to write a test for this, but it passes all current tests.

mradcliffe’s picture

Status: Needs review » Fixed

Committed.

altrugon’s picture

Status: Fixed » Needs review
StatusFileSize
new3.68 KB

Hi there,

I run your patch but I still found errors with the field names. The current field names were using underscore (php format) and not dashes and Drupal likes it for Javascript and CSS.

The attached patch fix the problem and still preserve the changes that you made.

altrugon’s picture

@mradcliffe I just noticed that while I was writing this post your patch got committed, I'm not sure if this will be a problem applying my patch. Just in case all the changes that I did were in cck_select_other.js file.

mradcliffe’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.15 KB

Thank you for the fixes. I'm not much of a javascript expert.

I've merged the changes in, and I like your change at the end too.

This is passing all tests at the moment, and gone through visual testing with myself and on a client's site.

Edit: I was really busy the past month, and I've been meaning to reply to this for quite some time. Sorry for the delay.

altrugon’s picture

You're welcome. I'm glad my code was useful.

mradcliffe’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.