How to replicate on a example rules form that uses ajax:
* On a rule: "add action"
* On new screen, select: "set a data value"
* On ajax-reloaded screen: select anything as data selector
* click "continue"

result: saveguard message, this should not.

analysis: i suppose the js code that marks submit buttons as ok is executed on pageload, but not on ajax.
if that ajax carries a submit button, this issue arises.

proposed solution: do it right and use behaviors, this should be fixed.

Comments

geek-merlin’s picture

Issue summary: View changes
geek-merlin’s picture

Status: Active » Needs review
StatusFileSize
new2.08 KB

Patch flying in.

anybody’s picture

Status: Needs review » Needs work

Thank you axel.rutz, I currently don't have the possibility to write a new patch but had a short look at yours.

behaviours seem correct but I think the context has to be added to the jQuery selected to prevent multiple event registration:

$('input, select').change( ...
should be

$('input, select', context).change( ...

for all events to only register on the currently given context in all (and especially AJAX) conditions! :)

geek-merlin’s picture