Closed (fixed)
Project:
Email Registration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
29 Aug 2014 at 19:01 UTC
Updated:
26 Dec 2018 at 19:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gregglesSeems like a fine idea to me. There's a bit of a chicken-and-egg situation whether those tools should modify this one or this one should leverage that one, but I'm happy to add support to email_registration, especially since you've got a patch coming.
Comment #2
joelstein commentedThanks! I don't think this patch would work well in HTML5 Tools, since Email Registration has its own logic about whether or not the username field is an email field or an email AND username field. Thus, I think the Elements support should come from this module.
The attached patch adds a checkbox to the Account settings page, labeled, "Use HTML5 email field", with a description, "Modify the user login textfield to an HTML5 type='email' field." It only appears if "Allow users login with e-mail or username" is unchecked. It's hidden altogether from the form if Elements is not installed.
With this patch, if Elements is installed, and "Allow users login with e-mail or username" is unchecked, and "Use HTML5 email field" is checked, then the login form (and login block form) textfield will be replaced with type="email".
Comment #3
joelstein commentedHere's a patch which also alters the Forgot Password form.
Comment #5
joelstein commentedHere's an updated patch which also changes the email field on the user registration form, deletes the variable on uninstall, and adds a simple function which we can use several times to perform the same logic.
Would love to see this committed. HTML5 is here to stay, and this makes a very nice usability improvement for mobile devices.
Comment #6
joelstein commentedOops, I forgot the #states bit on the accounts settings form.
Comment #7
andypostFor d8 we are using email element all over #2825909: Password Reset Email Field Type
this also needs implement hook_modules_disable() to unset this var
Comment #8
gregglesFixing title and noting that we don't need to forward port to d8.
Comment #9
joelstein commentedThe 'email_registration_email_field' variable is deleted in hook_uninstall() in the patch from #6, so I think we're good there.
Comment #10
andypostI mean email registration should have this hook to unset this variable when elements module disabled/removed
Comment #11
joelstein commentedAh, I see. I don't believe that it necessary. The variable only applies to the namespace of "email_registration", and if the Elements module is ever re-enabled, it would make sense that the setting would stay the same.
It suffices to simply remove the variable when the Email Registration module is uninstalled.
Comment #12
andypostSorry for derail, I misread the patch
Somehow I missed this wrapper
Comment #13
gregglesLooks good to me. Just fixing up credit info.
Comment #15
gregglesGreat, this is now committed. Thanks!
Comment #16
joelstein commentedThanks!