DEV: Sanitize integer site settings in front- and back-end (#23816)

Currently, if you set an integer site setting in the admin interface and include thousands separators, you will silently configure the wrong value.

This PR replaces TextField inputs for integer site settings with NumberField. It also cleans the numeric input of any non-digits in the backend in case any separators make it through.
This commit is contained in:
Ted Johansson
2023-10-06 19:21:01 +02:00
committed by GitHub
parent 484004fc5e
commit e113eff663
6 changed files with 20 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import SiteSettingDefaultCategoriesModal from "../components/modal/site-setting-
const CUSTOM_TYPES = [
"bool",
"integer",
"enum",
"list",
"url_list",