I think it would be more consistent if $form_state['clicked_button']['#to_state'] was set, even when we were staying in the same state. That way, other modules can inspect the #to_state, in the validate or submit hooks (assuming they know about it!)

CommentFileSizeAuthor
#3 to_state_nospace.diff1.71 KBgalaxor
#1 to_state.diff2.36 KBgalaxor

Comments

galaxor’s picture

StatusFileSize
new2.36 KB

Here is a patch that does what I want.

rdeboer’s picture

Thanks for the patch galaxor!
Unfortunately due to change of indentation, it's a bit hard to read. I have the feeling you only changed a couple of lines, but it looks like you changed a lot at first...

galaxor’s picture

StatusFileSize
new1.71 KB

For illustration purposes, I am also uploading the patch made with --ignore-all-space. It shouldn't actually be applied, because it will not apply the indentation changes, but it should be easier to read.

rdeboer’s picture

@galaxor, #3:
Much better: thanks!
Rik

galaxor’s picture

Just a note: I have a proposed patch to wf_required_fields (#1325008: Prevent form submission if required fields are not filled out). With that patch, wf_required_fields will integrate with workflow_extensions, but the integration will only work if this patch is applied to workflow_extensions.

galaxor’s picture

Status: Active » Needs review