Confirmation form for canceling your own signup
dww - January 19, 2009 - 16:00
| Project: | Signup |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | dww |
| Status: | closed |
Description
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.

#1
This 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.
#2
greggles 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
#3
This patch works nicely for me.
#4
I 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.
#5
Making 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.
#6
I 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.
#7
Whoops, I posted the wrong patch in #4. This one fixes the last of the destination bugs I found...
#8
After further review/testing, committed to HEAD and D6--1.
#9
Tee hee, there was still another destination bug. ;) http://drupal.org/cvs?commit=166723
#10
Automatically closed -- issue fixed for 2 weeks with no activity.