Moodle

disabledIf doesn't work with radio buttons (or apparently advcheckbox)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.5, 2.0
  • Fix Version/s: 1.9.5, 2.0
  • Component/s: Forms Library
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

from HQ chat

11:23 < timhunt> Presumably the JS makes some naive assumptions about the names or ids of the
controls that both radio button and advanced checkbox break.
11:23 < timhunt> Atuaally, it probably assuems tehre is a single form element with the same name,
11:24 < timhunt> And both adv checkbox and radio button have several.
11:24 < penny> i guess
11:24 < skodak> well, this really boils down to quickforms x formlib integration - I tried to fix
it but it would require patching quickforms so I gave up

Activity

Hide
Tim Hunt added a comment -

I'm a hero.

(But if you want this in 1.9.x, you will have to back-port it yourself.)

Show
Tim Hunt added a comment - I'm a hero. (But if you want this in 1.9.x, you will have to back-port it yourself.)
Hide
Penny Leach added a comment -

Tim you're my hero, I owe you beer! Not warm beer though.

I backported it to 1.9 with no problems btw.

Show
Penny Leach added a comment - Tim you're my hero, I owe you beer! Not warm beer though. I backported it to 1.9 with no problems btw.
Hide
Penny Leach added a comment -

(which means it should go into MOODLE_19_STABLE )

Show
Penny Leach added a comment - (which means it should go into MOODLE_19_STABLE )
Hide
Tim Hunt added a comment -

Ah, you mean you backported it you your copy of the 19 STABLE branch, and did not commit it to the main CVS repository? Is that not a little lazy? I should not do it today, because it is testing day. Remind me tomorrow.

Show
Tim Hunt added a comment - Ah, you mean you backported it you your copy of the 19 STABLE branch, and did not commit it to the main CVS repository? Is that not a little lazy? I should not do it today, because it is testing day. Remind me tomorrow.
Hide
Penny Leach added a comment -

Yes - I was a bit busy

Actually I got the impression from your initial comment that it was going to be hairy so I didn't want to just commit it to 1.9 without talking to you first

Show
Penny Leach added a comment - Yes - I was a bit busy Actually I got the impression from your initial comment that it was going to be hairy so I didn't want to just commit it to 1.9 without talking to you first
Hide
Tim Hunt added a comment -

Well, actually, I did have to change quite a lot of the JS, so I could easily have introduced new bugs, which is sort of why I did not backport on a Monday. Just after the weekly build is probalby better.

Show
Tim Hunt added a comment - Well, actually, I did have to change quite a lot of the JS, so I could easily have introduced new bugs, which is sort of why I did not backport on a Monday. Just after the weekly build is probalby better.
Hide
Tim Hunt added a comment -

Fix now backported to the 1.9 stable branch.

Show
Tim Hunt added a comment - Fix now backported to the 1.9 stable branch.
Hide
David Mudrak added a comment -

Hi Tim, Penny,

disabledIf() still does not work for 'advcheckbox' fields. Shall I reopen this issue or create a new linked one? Tim, can you look at it as the author of the patches above? TIA

Show
David Mudrak added a comment - Hi Tim, Penny, disabledIf() still does not work for 'advcheckbox' fields. Shall I reopen this issue or create a new linked one? Tim, can you look at it as the author of the patches above? TIA
Hide
Tim Hunt added a comment -

I think create a new issue, but mention that it is related to this one. I guess I can take a look at it, so assign the new bug to me.

Show
Tim Hunt added a comment - I think create a new issue, but mention that it is related to this one. I guess I can take a look at it, so assign the new bug to me.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: