#4958 closed enhancement (fixed)
Improve UX of visibility setting dialog on registration page
Reported by: | dcavins | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
When a user is changing the visibility setting for profile fields while registering (and while editing a profile), the interface doesn't offer consistent feedback.
First, if a user opens the visibility settings dialog and changes to a different privacy level, upon closing the dialog, the privacy level text isn't updated to show that the user has made a change. Second, if a user fails to successfully register (if the passwords don't match, or she doesn't fill in a required field), the form 'loses' the user's choices upon reload.
I've attached a patch that adds to buddypress.js to update the privacy level text upon closing the dialog and changes the functions bp_get_the_profile_field_visibility_level
and bp_get_the_profile_field_visibility_level_label
in bp-xprofile-template
to respect privacy levels stored in _POST rather than resetting to defaults on the registration page.
Thanks for all the 1.7 goodness!
-David
Attachments (3)
Change History (11)
#1
@
11 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 1.8
Thanks for the patch, dcavins. If we're going to introduce the change - so that visibility changes are reflected in the help text even before the page is saved - then I would also like to add one of those "Are you sure you want to leave this page with unsaved changes?" bits of JS. I don't know off the top of my head how to do this, but I think it's crucial so that we don't give the impression that this stuff is updated via ajax.
#2
@
11 years ago
That's a good point. I've attached a new patch that adds functionality like that to the profile edit form. The user confirmation dialog is based on this document: https://developer.mozilla.org/en-US/docs/DOM/window.onbeforeunload
The logic I used was:
If the user changes any input on the form (other than submit), then the window.onbeforeunload function is active, preventing the user from navigating away. However, if the user attempts to "leave" the page by clicking submit, window.onbeforeunload doesn't return anything, so the action is allowed.
I think it could be tidier, but it does work as I expect.
@
11 years ago
Cleanup of jQuery traversal, added confirmation dialog when leaving registration page
#3
@
11 years ago
I revisited this code and cleaned up a couple of things. The confirmation dialog challenges the user if he tries to leave an incomplete registration form or unsaved profile edit form.
Is there a preferred BP/WP method for making strings in javascript translatable?
#6
@
11 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 7152:
Profile Field Vis Dialog