Make WordPress Core

Opened 16 years ago

Closed 13 years ago

#15765 closed defect (bug) (maybelater)

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

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

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 14 years ago.
15765.patch (7.0 KB ) - added by toscho 14 years ago.
Add 'required' attribute to prevent accidental submissions. Fix code style violations en passant.
15765.2.patch (2.7 KB ) - added by DrewAPicture 13 years ago.
15765.3.diff (2.7 KB ) - added by jeremyfelt 13 years ago.

Download all attachments as: .zip

Change History (17)

#1 @ocean90
16 years ago

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

#2 @nacin
16 years ago

  • Component UINetwork Admin
  • Keywords ui-feedback added
  • Milestone Awaiting ReviewFuture Release

#3 @wonderboymusic
14 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
14 years ago

  • Milestone Future Release3.6

@toscho
14 years ago

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

#5 @toscho
14 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
13 years ago

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

#7 @DrewAPicture
13 years ago

  • Keywords commit added

#8 @nacin
13 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
13 years ago

  • Keywords 2nd-opinion added; commit removed
  • Milestone 3.6Awaiting 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
13 years ago

#10 @jeremyfelt
13 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review3.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
13 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
13 years ago

  • Milestone 3.7Future 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
13 years ago

  • Focuses ui added
  • Keywords ui-feedback removed
  • Milestone Future Release
  • Resolutionmaybelater
  • Status newclosed

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.