Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maxlife58’s picture

Issue summary: View changes

Same request, when administrator activates "User choice" option from autoassignerole config, it would be very usefull to manage the position of the field "Register as" in registration form, for example by giving it a weight.
In my case it would be important to put the field "Register as" as first, there is a way to do this?

Anonymous’s picture

Did anyone find a solution to this ? If yes, please share.

waluyo.umam’s picture

I activated the user choice, however I cannot control the position. Requesting to have the position control feature. Thanks.

mike.davis’s picture

This sounds like it would be a good feature to have. I would welcome any patches for review for this feature if anyone would like to have a look at it.

pramod_patil’s picture

Assigned: Unassigned » pramod_patil
pramod_patil’s picture

I have completed this functionality. Please review the patch.

pramod_patil’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: autoassignrole-user_roles_weight-1261208-6.patch, failed testing.

pramod_patil’s picture

Assigned: pramod_patil » Unassigned
Status: Needs work » Needs review
FileSize
2.7 KB

#field_parents was missing from my previous patch. Adding new patch, please review.

Status: Needs review » Needs work

The last submitted patch, 9: autoassignrole-user_roles_weight-1261208-9.patch, failed testing.

pramod_patil’s picture

Status: Needs work » Needs review
FileSize
2.25 KB

Corrected the patch once again. Please review.

lomasr’s picture

FileSize
40.2 KB
39.55 KB

Patch worked cleanly . I can see the added field in 'admin/config/people/autoassignrole/user' . Please see after.png. I entered the values -1,10 but I can't see the change in the field set positions on user/register page. Please see registration_page.png.
Thanks

pramod_patil’s picture

Hi @lomasr,

Thanks for testing my patch.

Can you please try with very high and very low value?
The username & password field container has the weight -10. To get the user roles field on the top, please give it the weight less than -10. Ex. -11, -20 works fine.

To position it in the bottom, please try adding higher value. Ex. 20, 30 etc.

Thanks,

lomasr’s picture

ok , I tested it as you suggested . It worked for me . Please mention this is the help text other-wise it seems confusing.
Thanks.

lomasr’s picture

Status: Needs review » Needs work
pramod_patil’s picture

Status: Needs work » Needs review
FileSize
2.46 KB

Hi @lomasr,

As per your suggestion, I have modified the weight field's description. Adding new patch. Please review.

Thanks,

lomasr’s picture

FileSize
73.64 KB

Hi pramod_patil ,

I applied the patch but it failed . Please see the screen.

Thanks

mike.davis’s picture

Issue summary: View changes
Status: Needs review » Needs work
+++ b/autoassignrole.admin.inc
@@ -215,6 +216,28 @@ function autoassignrole_user_settings() {
+    '#description' => t('The weight of the fieldset that contains role options.<br>
+      To display this fieldset on top of the form, please specify weight less than -10. For Ex. -30.<br>
+      To display at the bottom of the form, please specify weight greater than 15.<br>
+      If the field is not appearing at desired position, please increase or decrease the weight that you have specified.'),

The contents of the t() function shouldn't wrap multiple lines as this then can't be translated correctly.

You shouldn't really include HTML within the string either. You could break this into four different strings joined together by the
tag so that they can be translated correctly.

pramod_patil’s picture

Status: Needs work » Needs review
FileSize
2.52 KB

Hi @mike.davis,

I have corrected the t() as per your suggestions and broke down description into 4 different strings. Please review.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

This works as the patch provider says and helped me solve the issue. Thanks Pramod Patil.

mike.davis’s picture

Status: Reviewed & tested by the community » Fixed

This has been committed now

Status: Fixed » Closed (fixed)

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