Download & Extend

Add field ui support for user form and user display

Project:Masquerade
Version:8.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

the masquerade settings field that gets added to the user profile form does not have any weight assigned to it.

as soon as a user adds additional fields; since the masquerade field does not show on the manage fields form, it can't be moved relative to the new fields and ends up showing up in the middle of these new fields:

http://screencast.com/t/janRHvjvqj7

attached patch simply assigns that field a weight of 10 to move it down with the other admin fields

AttachmentSizeStatusTest resultOperations
masquerade-add_weight.patch507 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch masquerade-add_weight.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

Comments

#1

Status:needs review» needs work

To properly implement this functionality we need hook_field_extra_fields()

#2

Title:masquerade field on user edit form should have weight» Add field ui support for user form and user display
Category:bug report» feature request
Status:needs work» needs review

Here's a patch using hook_field_extra_fields().

AttachmentSizeStatusTest resultOperations
field-extra-1561352-2.patch855 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 16 pass(es), 2 fail(s), and 0 exception(s).View details | Re-test

#3

Great, +1 to be commited. let's get more reviews

#4

Status:needs review» reviewed & tested by the community

This patch is working nicely for me, fixing issues with not seeing the link when using Display Suite.

I think, after all this time, it's probably safe to commit!

My only comment, I usually consider it a good practice to instantiate variables:

<?php
$return
= array();
$return['user']['user']  = array(
  ...
);
?>

Thanks!

#5

Status:reviewed & tested by the community» needs work

The last submitted patch, field-extra-1561352-2.patch, failed testing.

#6

Version:7.x-1.x-dev» 8.x-2.x-dev
Status:needs work» patch (to be ported)

commited 8ee534e

Suppose this could be backported to 8x. probably to "advanced module"

#7

Category:feature request» task
Status:patch (to be ported)» needs review

pushed ea7dae9
still waits for advanced module

AttachmentSizeStatusTest resultOperations
1561352-masquerade-field-7.patch922 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in sites/default/modules/masquerade/masquerade.module.View details | Re-test

#8

Status:needs review» needs work

The last submitted patch, 1561352-masquerade-field-7.patch, failed testing.