Over at #51226-18: allow users to edit their own signup, Miglius suggests a confirmation form when users attempt to cancel their own signup. That seems like a reasonable thing to do regardless of how that other issue plays out, and it's mostly unrelated, so I'd rather handle it in a separate issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 361073_confirm_cancel_own_signup.7.patch | 4.44 KB | dww |
| #4 | 361073_confirm_cancel_own_signup.4.patch | 4.42 KB | dww |
| #2 | 361073_confirm_cancel_own_signup.2.png | 12.12 KB | dww |
| #2 | 361073_confirm_cancel_own_signup.2.patch | 3.42 KB | dww |
| #1 | 361073_confirm_cancel_own_signup.1.patch | 1.19 KB | dww |
Comments
Comment #1
dwwThis is maybe slightly wonky, since I'm reusing the menu item at signup/cancel/[sid]/[token], since that's already setup perfectly with the confirm form and everything. But, it seems to work just fine, we have to redirect to a confirm form anyway, and I don't know that people look too closely to the URL during a confirm, anyway...
This patch will only apply after you apply http://drupal.org/files/issues/51226_edit_signup.22.patch from #51226-22: allow users to edit their own signup.
Comment #2
dwwgreggles suggested converting cancel (the "secondary operation") from a button into a link, based on http://www.svennerberg.com/2008/09/the-use-of-buttons-in-web-forms and the fact that core does this for confirm forms generally. I'm not 100% sure I agree, since I think of this more like the "Delete" button on a node edit page... But, greggles points out:
The good news is that it does simplify the code a bit, including some slightly yucky stuff from signup_edit_form.js...
So, I'll probably go this route, but I'd like to hear other feedback before I commit this.
Thanks!
-Derek
Comment #3
miglius commentedThis patch works nicely for me.
Comment #4
dwwI noticed there were a few cases where the destination wasn't properly getting set. This should work better. I also changed the cancel confirm form itself so that if you land there with a destination set, the "Keep signup" link sends you back to your destination, too.
Comment #5
yoroy commentedMaking cancel a text link is a good idea
But like greggles suggests, if this indeed *lowers* the change of this accidentally happening I would argue that *lessens* the need for an extra confirmation form :-)
"Are you sure…" forms are generally annoying. Mind that this 'feature' was only suggested beforehand in the previous thread, not because people reported actually getting a lot of duplicate signup emails through accidental unsubscribes (correct me if I'm wrong here). So I feel like you are fixing something that isn't broke yet.
Comment #6
geodaniel commentedI like the idea of the text link for this button, as it helps distinguish it from the main action. I think I'd be in favour of leaving an 'are you sure' form in there though. I'm not the biggest fan, but it is a destructive action, so I think it's good to include it still, much like in core.
Comment #7
dwwWhoops, I posted the wrong patch in #4. This one fixes the last of the destination bugs I found...
Comment #8
dwwAfter further review/testing, committed to HEAD and D6--1.
Comment #9
dwwTee hee, there was still another destination bug. ;) http://drupal.org/cvs?commit=166723