'Cancel' button in Login Toboggan

bcobin - December 24, 2008 - 16:31
Project:LoginToboggan
Version:7.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

First off, thank you for this terrific module! It's great not to have to tie up that valuable front-page real estate with a block anymore!

One problem - it's (probably) small, but I think potentially very important: When using the popup js option, I would suggest that there needs to be a "cancel" button to close the popup window should the user opt not to register. Needing to click the original link to close the window is counterintuitive for many users and being unable to close a window they've just opened could easily be enough to "scare" new potential users away. Not good.

I'm not a coder, but it looks to me like the easiest way to accomplish this would be a hack to the 5.x user module adding the 'cancel' form element and using the Javascript:window.close() command in the function_user_block() at line 493 (Drupal 5.12). Could you (or anyone) possibly provide me with some guidance here? Thanks again for a terrific module - great work!

#1

hunmonk - December 25, 2008 - 03:53
Status:active» won't fix

5.x is a stable branch, and i will not accept any new features for it. if you wish, you may reopen the issue for 6.x and we can examine it there.

#2

bcobin - December 25, 2008 - 13:09

Thank you very much for the quick response; unfortunately, there are just too many modules that haven't yet been ported over to D6 yet for me to be able to use it for actual clients, much as I'd like to be able to.

I'll try hacking around on my own and open the issue for D6 when I have a chance; I do think it's a valid point and seems like it should be a fairly straightforward addition. In the meantime, if you should have any suggestions as to the best way to go about this for D5, it would be greatly appreciated!

Thanks again for a great module - keep up the great work!

#3

bcobin - December 25, 2008 - 15:56

Got it! Kudos to the aptly-named ByteSlinger here.

In my case, the line to insert at line 536 of the module is as follows:

$form['cancel'] = array('#type' => 'button','#value' => t('Cancel'),'#attributes' => array('onClick' => "toggleboggan();this.blur();return false;"));

Works like a charm... thanks, ByteSlinger!

#4

bcobin - January 21, 2009 - 02:32

Unfortunately, this only works for D5, not D6. Trying to use the same method for D6 results in a "submit."

I'd say this is more important than it would seem at first glance; anything that can confuse a user on their first visit (such as not being able to close a window they opened) is a bad thing. Any ideas? Thanks!

#5

bcobin - January 21, 2009 - 02:32
Version:5.x-1.3» 6.x-1.3
Status:won't fix» active

Unfortunately, this only works for D5, not D6. Trying to use the same method for D6 results in a "submit."

I'd say this is more important than it would seem at first glance; anything that can confuse a user on their first visit (such as not being able to close a window they opened) is a bad thing. Any ideas? Thanks!

#6

hunmonk - October 14, 2009 - 19:51
Version:6.x-1.3» 7.x-1.x-dev
Category:support request» feature request
 
 

Drupal is a registered trademark of Dries Buytaert.