Opened 10 years ago
Closed 10 years ago
#32645 closed defect (bug) (fixed)
Save Changes button should not show on my-sites.php when user is only member of one site
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | ui, administration, multisite | Cc: |
Description
In my sites there is a select box to change your primary site even if you only have one site. It doesn't make any sense to have the select if you only have one site.
Attachments (5)
Change History (14)
#1
@
10 years ago
- Component changed from General to Networks and Sites
- Focuses ui added
- Keywords needs-patch ux-feedback added
- Summary changed from Primary site select box should not show when user is only member of one site to Save Changes button should not show on my-sites.php when user is only member of one site
- Version changed from trunk to 3.0
The main issue seems to be the appearance of the "Save Changes" button when there are no changes that can even be made. The select box just renders as text.
Perhaps we should conditionally show the button (or the entire form) only when you are a member of more than one site.
#2
@
10 years ago
- Milestone changed from Awaiting Review to 4.3
Good call @jmacaluso711, thanks for the ticket!
#3
@
10 years ago
- Keywords has-patch added; needs-patch removed
Attached a patch that removes the 'Save Changes' button when the user only has 1 site (meaning they have nothing to update or save).
#4
@
10 years ago
Only problem I see here is that there is a filter on this page for adding additional input fields for the whole form or each site on the list, which is also why the save changes button appears at the bottom instead of the top.
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
10 years ago
#8
@
10 years ago
32645.2.diff also places the nonce and action inputs in the conditional output.
We don't use has_filter
much in core, but the use case here makes sense.
Screenshot