Skip to content

Add confirmation dialog before script execution #2474

Closed
@mtrezza

Description

@mtrezza

New Feature / Enhancement Checklist

Current Limitation

A script is executed as soon as it is selected from the context menu. For sensitive operations it should be possible to show a confirmation dialog before the script is executed.

Feature / Enhancement Description

Add a config option to the script that shows a confirmation dialog, which allows the user to either "Cancel" (default / highlight button) or "Continue". By default, no dialog should be displayed.

The dialog could look like this:

Screenshot 2023-06-23 at 20 59 02

In addition, the confirmation dialog should have 2 levels of severity, as is currently implemented throughout the dashboard UI. A "critical" level (red style) and an "info" level (blue style), like this:

image

Example Use Case

"apps": [
  {
    "scripts": [
      {
        "title": "Delete Account",
        "classes": ["_User"],
        "cloudCodeFunction": "deleteAccount",
        "showConfirmationDialog": true,
        "confirmationDialogStyle": "critical" // or "info" for blue style
      }
    ]
  }
]

Alternatives / Workarounds

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$20Bounty applies for fixing this issue (Parse Bounty Program)state:releasedReleased as stable versionstate:released-alphaReleased as alpha versionstate:released-betaReleased as beta versiontype:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions