WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#2711 closed defect (fixed)

Make Sponsor province field optional

Reported by: iandunn Owned by: coreymckrill
Milestone: Priority: low
Component: WordCamp Site & Plugins Keywords: good-first-bug has-patch
Cc:

Description

In the Sponsors custom post type, the State / Province field is required, but not all countries have intermediate regions like that. It should be optional for those countries.

On an implementation level, the simplest way is to just make the field always optional, but add a note asking users to fill it in if their country does have them.

See https://wordpress.slack.com/archives/C08M59V3P/p1491641449095148

Attachments (5)

2711.meta.diff (813 bytes) - added by davidmosterd 2 years ago.
Initial fix
2711.meta.2.diff (817 bytes) - added by davidmosterd 2 years ago.
Changed the context a little
2711.meta.3.diff (78.9 KB) - added by davidmosterd 2 years ago.
Added not applicable as a default state
2711.meta.4.diff (8.1 KB) - added by davidmosterd 2 years ago.
removed auto-formatting
2711.meta.5.diff (9.0 KB) - added by davidmosterd 2 years ago.
sneaked in high priority

Download all attachments as: .zip

Change History (9)

#1 @davidmosterd
2 years ago

Working on this right now. I have removed the required html attribute and added a description tag stating it's only required when your country uses states or provinces. I'll submit my patch in a moment.

@davidmosterd
2 years ago

Initial fix

@davidmosterd
2 years ago

Changed the context a little

#2 @davidmosterd
2 years ago

  • Keywords has-patch added; needs-patch removed

@iandunn Hows this for a first meta-ticket? :)

@davidmosterd
2 years ago

Added not applicable as a default state

#3 @davidmosterd
2 years ago

In the https://meta.trac.wordpress.org/attachment/ticket/2711/2711.meta.3.diff I added a 'underwater' default state that is 'Not Applicable' to make sure it's always filled with something meaningful. It removed this string on the user-form to prevent them seeing the actual value.

@davidmosterd
2 years ago

removed auto-formatting

@davidmosterd
2 years ago

sneaked in high priority

#4 @coreymckrill
2 years ago

  • Owner set to coreymckrill
  • Resolution set to fixed
  • Status changed from new to closed

In 5575:

WordCamp Post Types: Make sponsor invoice province field optional

Some regions don't have a state or province as part of their official
address format. However, some banks always require that field on
invoices, regardless of the country. The solution in this patch is to
make the state/province field optional, but add the string
"Not applicable" if the field is left blank when the form data is
saved.

Props davidmosterd
Fixes #2711

Note: See TracTickets for help on using tickets.