This is a feature jjeff and I wrote for a site we're building that we thought could be useful to the community. Screenshots attached.

The idea is to add an option to LT to present a single page to logged-out users that can both register them AND log them in, using nice JS buttons so that you don't need to re-load the page in between, instead of relying on tabs which (as the UMN usability study saw) people have a hard time seeing.

A side-effect of this patch is you need the "I forgot my password" link on the login form itself (where, arguably, it makes more sense anyway), so a new option's been added for that as well.

Patch comin' right up.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webchick’s picture

Status: Active » Needs review
FileSize
22.11 KB

Patch.

webchick’s picture

Oops. How about one *without* all the stuff from #264300: Use checkboxes rather than "Enabled"/"Disabled" radios :D

litwol’s picture

FileSize
9.51 KB

I created the patch from within the module folder.

webchick: this includes all the changes we've discussed on irc.

Fayna’s picture

I patched the module and enabled this unified page as well as the password link but am still unsure how to access it. Should it be at ../user? All that shows up is the "I forgot my password" link on the login form.

hunmonk’s picture

Status: Needs review » Needs work
FileSize
7.53 KB
  • changed radios to checkboxes per the recent UI redesign
  • fixed name and default value for 'logintoboggan_forgot_pass_link' -- should be 'logintoboggan_forgot_password_link' (no abbreviations, blech), and the it should default to checked if either 'logintoboggan_forgot_password_link' or 'logintoboggan_unified_login' is enabled.
  • Changed 'I forgot my password' to 'Request new password', so it's consistent with the link in the block.
  • i'm not so sure i like the option to add the password link. at least in my testing, on the main user login form, you now have both the tab and the link, which seems sloppy and confusing. am i missing something here?
  • unfortunately, it doesn't look like hook_menu_alter() gets called when a settings page is saved. this means that if switch off the unified login page, it doesn't actually take effect until i enable/disable a module :(
  • can't we do #login-message instead of .toboggan-unified #login-message? the id tag already specifies element, so i'm not understanding why it's useful to prepend a class.
  • do we want the js code in a separate file? we already have logintoboggan.js
  • seems like this todo: // TODO: Somehow add a class of "default" to whichever form is the default. should be handled before this is committed.
  • do we want to add the CSS and JS files in the theme function? my inclination is to add them in the module code itself, and let the theme function add another CSS file to override the current CSS if necessary. not sure on the proper procedure here, though, so open to feedback.
  • the js code is using if (Drupal.jsEnabled) {, and the new format is Drupal.behaviors.myBehavior = function (context) {
  • the attached patch is missing the unified.js file, since i don't have my copy of LT rolled into SVN/BZR, so if somebody could reroll my changes w/ that in, that would be great.
EvanDonovan’s picture

Has any more work been done in this area? I think a unified login/register page would really streamline things for users....

KarenS’s picture

FileSize
8.94 KB

I brought this patch up to date against the 6.1 branch (couldn't figure out what the 6.2 branch was for). This would still be a nice enhancement.

RobbM’s picture

Great patch. But for 6.x-1.7, it seems that any occurrences of #toboggan-unified need to be replaced with .toboggan-unified (in unified.js). Sorry, I'm not able to update the patch.

jjeff’s picture

Version: 7.x-1.x-dev » 6.x-1.7
FileSize
11.04 KB

Here's an updated patch with a few improvements such as clearing the menu cache when the unified login setting is changed and fixing the JS file with the changes in #8.

We've been using this functionality on Lullabot sites for some time now. I really hope that it will make its way into LoginToboggan. If not, perhaps we will have to split this off into a separate module. That would be a shame.

-Jeff

jjeff’s picture

Minor text changes to change "I forgot my password" to "Request new password"

hunmonk’s picture

Version: 6.x-1.7 » 7.x-1.x-dev

thanks for the updates. i'm not accepting new features for 6.x anymore, but my plan is to get this into 7.x before its first official release.

hunmonk’s picture

Status: Needs work » Fixed

took the patch from #10, ported it to 7.x, futzed for a few hours to work out all the kinks, and committed it to 7.x-1.x-dev.

the one major change from the earlier patch is that i ripped out the option for the request password link, and just rolled the display of the link into the unified login setting. that option alone left the 'Request new password' tab on the page, and added another link to get to the same place -- didn't feel like good UI to me. i think the tab alone is enough if the unified login page is not being used.

thanks to everyone for keeping up the work on this patch. it took awhile, but it finally got in -- the major new feature of the 7.x branch... :)

Status: Fixed » Closed (fixed)

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

AaronBauman’s picture

Patch in #10 didn't apply cleanly for me -- here's an updated patch against 6.x-1.8.
I understand that this will not get in to 6.x, but thought for the majority of Drupal users who are still using 6.x it still might be useful.

fearlsgroove’s picture

Re-rolled for 1.9

Lionsharz’s picture

Hi

Is there a way to display this unified form in a block?

AaronBauman’s picture

#15 works against 6.x-1.10 with fuzz.