WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 8 years ago

#15765 closed defect (bug) (maybelater)

wp-admin/ms-sites.php doesn't indicate required fields

Reported by: novasource Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.0.2
Component: Network Admin Keywords: has-patch
Focuses: ui, multisite Cc:

Description

In wp-admin/ms-sites.php, apparently all fields under Add Site are required, but there is no visual indication.

Attachments (4)

required-fields.diff (1.6 KB) - added by wonderboymusic 9 years ago.
15765.patch (7.0 KB) - added by toscho 9 years ago.
Add 'required' attribute to prevent accidental submissions. Fix code style violations en passant.
15765.2.patch (2.7 KB) - added by DrewAPicture 9 years ago.
15765.3.diff (2.7 KB) - added by jeremyfelt 8 years ago.

Download all attachments as: .zip

Change History (17)

#1 @ocean90
11 years ago

With 3.1 it's wp-admin/network/site-new.php.

#2 @nacin
11 years ago

  • Component changed from UI to Network Admin
  • Keywords ui-feedback added
  • Milestone changed from Awaiting Review to Future Release

#3 @wonderboymusic
9 years ago

  • Keywords has-patch added

Added required using same HTML as the edit-user.php form, including label with the for attribute. Patched.

#4 @nacin
9 years ago

  • Milestone changed from Future Release to 3.6

@toscho
9 years ago

Add 'required' attribute to prevent accidental submissions. Fix code style violations en passant.

#5 @toscho
9 years ago

  • Cc info@… added

To prevent useless submissions I have added the required attribute. Browsers supporting this will show a warning message, and they will prevent a form submission.

#6 @DrewAPicture
9 years ago

15765.2.patch combines required-fields.diff with just adding the required attributes to the three inputs.

#7 @DrewAPicture
9 years ago

  • Keywords commit added

#8 @nacin
8 years ago

I don't see us using required HTML attributes anywhere else. Not saying we shouldn't, but — new ticket to cover the more general case?

#9 @nacin
8 years ago

  • Keywords 2nd-opinion added; commit removed
  • Milestone changed from 3.6 to Awaiting Review

Is this a situation where we don't do it when all fields are required? That seems to be the pattern on user-new.php. In which case, wontfix?

@jeremyfelt
8 years ago

#10 @jeremyfelt
8 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 3.7

I'm able to add a site on current trunk without a title for a subdomain setup. The fields required are Site Address and Admin Email. Without a title specified, the site is just referred to as its address.

Having a required indicator next to these is probably much better than the experience provided by the error that comes up on the next screen if you don't fill one in properly.

15765.3.diff removes the required flags from Site Title added in previous patches.

#11 @jeremyfelt
8 years ago

On a side note... while not required, adding multiple sites under a subdirectory setup without titles would cause confusion quickly.

http://cl.ly/image/2J470i0C3H0A

In the screenshot, both src.wordpress-develop.dev listings have different subdirectory paths specified. SRC Dev is the original site.

#12 @nacin
8 years ago

  • Milestone changed from 3.7 to Future Release

Listing all but one field as "required" is weird. When that single remaining field is a de facto requirement, I guess I just don't see the point at all.

This has been kicking around for a while, moving out of 3.7 either way.

#13 @helen
8 years ago

  • Focuses ui added
  • Keywords ui-feedback removed
  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

I usually like required field indicators but it seems like extraneous noise when all fields are required. It would be nice to have better error handling than wp_die() though (not just here, everywhere). I'm going to maybelater this, but will leave a note on #20592 that if hooks are added, we will probably want to revisit.

Note: See TracTickets for help on using tickets.