The attached patch adds a "Save and continue" button to the node add form for products. It appears between the Save and Preview buttons and saves the node but redirects to the node edit page so you can continue editing the node. Enjoy. : )

Comments

Island Usurper’s picture

Issue tags: +dc2009 code sprint

Tag for DC 2009 code sprint.

torgospizza’s picture

Hey Ryan, no patch attached :)

rszrama’s picture

StatusFileSize
new997 bytes
Island Usurper’s picture

StatusFileSize
new987 bytes

Patch didn't work for new products. Rerolled.

a_c_m’s picture

Status: Needs review » Needs work

Currently it wont override a existing destination in the URL, so if your editing a node from the 'list content' page when you hit Save and continue, your still getting pushed back to the 'list content' page.

rszrama’s picture

Status: Needs work » Needs review
StatusFileSize
new1.08 KB

I tried basically everything I could regarding $form_state['redirect'] and even $form_state['#redirect'] before resorting to simply unsetting the destination variable if the Save and continue button is clicked. I think the attached patch is ready to roll.

Island Usurper’s picture

StatusFileSize
new2.03 KB

I think the Save and Continue button should include the GET data in its redirect. For example, if someone clicks an edit link from the Content admin page, the Save and Continue button should return them to the node edit form, but if they click Save after that, they should be redirected back to the admin page.

rszrama’s picture

Status: Needs review » Needs work

I thought about that but consciously avoided it, b/c moving tabs would do away w/ the destination string anyways. Also, isn't your patch passing an array now through the redirect instead of a string as specified by drupal_goto()? I think my vote is still for the patch in #6, but I don't really one way or the other.

rszrama’s picture

Status: Needs work » Fixed

Needed to move on w/ other changes in the product module and was too lazy to revert and re-apply these patches. I think #6 is at least bug free, and we can readdress if a consensus is reached one way or the other related to preserving $_GET.

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -dc2009 code sprint

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