Hide (or explain) registration key field in new user signup form

tobias - July 7, 2009 - 03:42
Project:Organic Groups Registration Keys
Version:6.x-1.2
Component:User interface
Category:bug report
Priority:normal
Assigned:evoltech
Status:closed
Description

I am not seeing how to hide or add helper text to the registration key field in the new user signup form. Without it, the form is very confusing. Would it be possible to add an option to hide it or provide help text?

Thanks,

Tobias

#1

marcp - July 10, 2009 - 21:21

Please let me know what you would like the help text to say, because there should definitely be something there. I'm guessing that you are not requiring a registration key, because if you were it seems like it would be a little bit less confusing (but still lame).

Thanks,

Marc

#2

marcp - September 1, 2009 - 17:13

For this, we need to:

1. Put some sort of default description in #description
2. Provide an administration option to change the #description text
3. Provide and administration option to turn off the display of the registration key field on the registration form (it would still be available to logged in users to join groups)

#3

evoltech - September 4, 2009 - 22:28
Assigned to:Anonymous» evoltech

Do you want to add me as a maintainer so I can commit, or should I submit a patch?

I am also guessing that DRUPAL-6--1-1 is the development branch even though there is a DRUPAL-6--1-2 branch?

The way this module is designed, the configurable site help message will be for all groups, as there is no way with the current design to say something like:

group1: <custom_message1> <reg_key_form>
group2: <custom_message2> <reg_key_form>
group3: <custom_message3> <reg_key_form>

#4

evoltech - September 4, 2009 - 23:08
Status:active» needs review

This patch adds the features described in #2.

AttachmentSize
og_reg_keys-512156.patch 3.14 KB

#5

marcp - September 5, 2009 - 15:06

DRUPAL-6--1 is the current branch, and I don't think we need to branch any time soon.

DRUPAL-6--1-2 is the tag on the most recent release. The next release will be tagged DRUPAL-6--1-3.

Haven't tried the patch yet, but it looks good. I like the tri-state options, but am wondering what happens for users who are already using this -- do they need an update() function in the .install file to convert to the tri-state og_reg_key_required variable?

#6

evoltech - September 8, 2009 - 23:30

I rerolled against DRUPAL-6--1-2. I will roll again for the situation you described in #5.

AttachmentSize
og_reg_keys-512156.2.patch 3.14 KB

#7

evoltech - September 8, 2009 - 23:57

Ok This patch is against DRUPAL-6--1-2, and includes a update function in the install file, which will switch over existing og_reg_keys installations to the new tristate use of the og_reg_key_required variable.

AttachmentSize
og_reg_keys-512156.3.patch 3.85 KB

#8

evoltech - September 10, 2009 - 11:20

whoops there was a bug in there.

AttachmentSize
og_reg_keys-512156.3.patch 3.84 KB

#9

marcp - September 13, 2009 - 19:20
Status:needs review» needs work

The "not required but display it on the registration form" isn't respecting the "not required" part. To clean this up, please stick this up top of the file and use the constants later on in the code when checking:

define('OG_REG_KEYS_REQUIRED', 0);
define('OG_REG_KEYS_NOT_REQUIRED_VISIBLE', 1);
define('OG_REG_KEYS_NOT_REQUIRED_NOT_VISIBLE', 2);

It might be good to also provide:
function og_reg_keys_required_for_registration() and function og_reg_keys_visible_on_registration_form() to keep the tri-state constants from appearing all over the place.

Also, the update function in the install file throws some warnings because it doesn't return an empty array. I'd like to change that function to og_reg_keys_update_6100 also, since this is the first update function for 6.x-1.x. It doesn't really matter, as long as the update numbers will ascend, but it seems cleaner to start there.

#10

marcp - September 13, 2009 - 19:29

Also, please change out the og_reg_key_required wording for the tri-state on the settings form to:

title: Registration key requirements for new account creation
options:
  Registration key is required for new account creation.
  Registration key is not required for new account creation.  Display it on the registration form.
  Registration key is not required for new account creation.  Do not display it on the registration form.

That field should be #required also.

#11

evoltech - September 14, 2009 - 18:38

Re: renaming of the upgrade function, my justification, but you are right about the ascending. I changed it at your request.

This patch includes your requests from #9 and #10.

AttachmentSize
og_reg_keys-512156.4.patch 5.49 KB

#12

marcp - September 15, 2009 - 19:42
Status:needs work» fixed

Thanks! Committed with a few minor modifications. Also, hook_uninstall() now deletes variables used by the module.

#13

System Message - September 29, 2009 - 19:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.