Make WordPress Core

Opened 15 months ago

Last modified 9 months ago

#58264 new enhancement

Adding spinner to submit_button with wrap

Reported by: msolution's profile msolution Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2
Component: Administration Keywords: 2nd-opinion
Focuses: ui, administration, template Cc:

Description

As a plugin developer, I need to use this function on almost all panels I make, but every time I need an ajax functionality, or somewhere where i need to prevent double click and disable the button, and perhaps show a spinner, the wrap=true functionality does not work for me.

I suggest we extend this function to have a spinner, in case of wrap=true.

Attachments (1)

mypatch.patch (1.8 KB) - added by msolution 15 months ago.
patch

Download all attachments as: .zip

Change History (2)

@msolution
15 months ago

patch

#1 @sabernhardt
9 months ago

  • Component changed from General to Administration
  • Keywords 2nd-opinion added

I do not think adding a sixth argument to the functions would help. See ticket:20490#comment:5, ticket:20492#comment:2 and ticket:31749#comment:4.

The classic widgets form used false for the $wrap argument and added spinner markup, and the general settings page creates a different spinner for new language installations. Several plugins use false and include their own spinner and container markup (including Jetpack, ElementsKit Elementor addons and The Events Calendar).

I could suggest making a consistent spinner for both Core and plugins to use, but even Core has at least two different implementations.

Note: See TracTickets for help on using tickets.