If you currently embed the UI of a rule component and use the form_submit functions, a notification will be printed for each submit: "Your changes have been saved.". This means, that if you embed multiple components, multiple messages will be submitted(one for each $component->form_submit).
This patch fixes the issue by moving the drupal_set_message statement out of the form_submit function into the form functions.

Comments

klausi’s picture

Component: User Interface » User interface
Status: Needs review » Reviewed & tested by the community

Yes please!

klausi’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.85 KB

Actually, you forgot one:

klausi@alice:~/workspace/rules$ grep -rin ">form_submit" *
rules_admin/rules_admin.inc:288:  $rules_config->form_submit($form, $form_state);
ui/ui.forms.inc:68:  $form_state['rules_element']->form_submit($form, $form_state);
ui/ui.forms.inc:377:  $form_state['rules_element']->form_submit($form, $form_state);

Patch attached.

fago’s picture

Status: Needs review » Fixed

thanks, committed.

Status: Fixed » Closed (fixed)

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