Due to a simple wording error, the second argument to ajax_command_changed() (to mark a div with an asterisk) doesn't work. The attached patch fixes it.

This is a followon to #544418: Integrate CTools AJAX framework with Drupal to extend (and replace) existing ahah framework, where this command was introduced.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

The Examples module AJAX Example now provides a testbed for this. Use the "AJAX Example: Advanced Commands" menu.

katbailey’s picture

Status: Needs review » Reviewed & tested by the community

For anyone else looking at this, it's a hard one to test while this issue is still outstanding: #622922: User input keeping during multistep forms. ($form_state['values']['changed_command_example'] is always empty so the asterisk doesn't get added).

However, if I remove the dependency on anything in $form_state['values'] in the callback, I confirm that the asterisk does get added, whereas it doesn't without the patch.

webchick’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

I can haz tests?

rfay’s picture

Status: Needs work » Needs review
FileSize
3.59 KB

@webchick, you now haz tests. Lots of tests.

This patch adds a test for the asterisk portion. The main portion was already covered by the other issue.

webchick’s picture

Status: Needs review » Fixed

Excellent!

Committed to HEAD, with a couple of small whitespace fixes.

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

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