framework icon indicating copy to clipboard operation
framework copied to clipboard

[1.x] fix: reset admin page save button in catch handler

Open YUCLing opened this issue 1 year ago • 1 comments

Fixes #3962

Changes proposed in this pull request: Add a catch handler to saveSettings() to reset admin page's save button state.

Reviewers should focus on: Should a newly added function that only sets loading to false be created.

Screenshot No much changes will be shown to users.

QA Create a Saving event listener and throw an exception to create a saving error.

Necessity

  • [ ] Has the problem that is being solved here been clearly explained?
  • [ ] If applicable, have various options for solving this problem been considered?
  • [ ] For core PRs, does this need to be in core, or could it be in an extension?
  • [ ] Are we willing to maintain this for years / potentially forever?

Confirmed

  • [ ] Frontend changes: tested on a local Flarum installation.
  • [ ] Backend changes: tests are green (run composer test).
  • [ ] Core developer confirmed locally this works as intended.
  • [ ] Tests have been added, or are not appropriate here.

Required changes:

  • [ ] Related documentation PR: (Remove if irrelevant)
  • [ ] Related core extension PRs: (Remove if irrelevant)

YUCLing avatar Feb 03 '24 05:02 YUCLing

Should I also create a PR to fix this in 2.0?

YUCLing avatar Mar 17 '24 05:03 YUCLing