mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-21 04:42:56 +08:00
## Background
Add an delete confirmation dialog prior to deleting a data, since this
action is high-impact and irreversible.
## Changes
This PR adds confirm message when deleting data from schema setting.
This message only shows up if the ` deleteWarning` is set.
Admins can set the title and/or the message of the confirm dialog:
```
site_setting_name:
type: objects
schema:
name: "name"
deleteWarning:
title: "Delete this data?"
message: "This will also remove all contents."
properties:
...
```
<img width="791" height="225" alt="Screenshot 2025-10-10 at 1 51 14 PM"
src="https://github.com/user-attachments/assets/4718960e-ae20-441d-a71b-970ea6190775"
/>
|
||
|---|---|---|
| .. | ||
| editor | ||
| types | ||
| editor.gjs | ||
| field-input-description.gjs | ||
| field.gjs | ||
| number-field.gjs | ||