discourse/app/assets/javascripts/admin/addon/components/site-settings
Osama Sayegh a92cf019db
FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347)
This commit fixes a number of bugs in `file_size_restriction` settings and does a little of refactoring to reduce duplicated code in site setting types (the refactoring is necessary to fix one of the bugs).

The bugs in `file_size_restriction` settings that are fixed in this commit:

1. Save/cancel buttons next to a `file_size_restriction` setting are shown upon navigating to the settings page without changes being made to the setting
2. Cancel button that discards changes made to the setting doesn't work
3. Reset button that resets the setting to its default doesn't work
4. Validation error message isn't cleared when resetting/cancelling changes

To repro those bugs, navigate to `/admin/site_settings/category/files` and observe the top 2 settings in the page (`max image size kb` and `max attachment size kb`).

Internal topic: t/134726.
2024-08-15 19:38:47 +03:00
..
bool.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
bool.js DEV: Fix "no-setter-return" lint (#24585) 2023-11-28 10:49:49 +01:00
category-list.gjs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
category.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
category.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
color.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
color.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
compact-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
compact-list.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
description.gjs DEV: Update htmlSafe imports (#26776) 2024-04-27 12:01:58 +02:00
emoji-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
emoji-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
enum.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
enum.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
file-size-restriction.gjs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
file-types-list.gjs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
group-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
group-list.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
host-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
host-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
integer.gjs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
named-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
named-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
secret-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
secret-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
simple-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
simple-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
string.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
string.js DEV: Update JSON Editor to Glimmer and use new modalAPI (#22421) 2023-07-05 10:27:29 +01:00
tag-group-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
tag-group-list.js FEATURE: Add new site setting type for tag-group lists (#21993) 2023-06-09 11:02:55 -04:00
tag-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
tag-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
upload.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
upload.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
uploaded-image-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
uploaded-image-list.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
url-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
url-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00
value-list.hbs FIX: Make cancel and reset buttons work for `file_size_restriction` settings (#28347) 2024-08-15 19:38:47 +03:00
value-list.js DEV: Convert admin component definitions to native class syntax (#20311) 2023-02-23 15:32:53 +00:00