Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Editor user edit#2832

Merged
aaronschachter merged 4 commits intoDoSomethingArchive:devfrom
aaronschachter:editor_user_edit
Jul 15, 2014
Merged

Editor user edit#2832
aaronschachter merged 4 commits intoDoSomethingArchive:devfrom
aaronschachter:editor_user_edit

Conversation

@aaronschachter
Copy link
Contributor

@angaither Can you please review?

Overview

Closes https://jira.dosomething.org/browse/DOS-58

  • Enables User profile pictures
  • Hides picture upload from all non-staff

Closes https://jira.dosomething.org/browse/DOS-59

  • Allows editors ability to edit a User's First Name, Last Name, City, State, and Profile Picture by creating a new page callback and form at user/*/info
    • I chose to implement this way vs. unsetting a bunch of form elements within the dosomething_user_form_alter, because the only way an editor could even access the user/*/edit form would be to grant permission to administer users -- which also allows them to delete users if they went to the URL directly.
    • This is also in the long run potentially less of a headache to maintain, since we'd always have to unset profile form elements in the form_alter as we add new ones.

Screenshots

screen shot 2014-07-15 at 3 57 52 pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to make this a dropdown using the addressfield list of 'administrative area' choices if it's easy to do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had trouble finding it in the addressfield code. Figured this was an easy way to at least get functionality in, and could always add back in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth a shot to use the custom address field that's being used on the signup forms?
That way the validation would happen already as well

@angaither
Copy link
Contributor

Anyways, the code is all fine 👍

aaronschachter added a commit that referenced this pull request Jul 15, 2014
@aaronschachter aaronschachter merged commit 588b375 into DoSomethingArchive:dev Jul 15, 2014
@aaronschachter aaronschachter deleted the editor_user_edit branch July 21, 2014 21:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants