mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Add optional confirmation dialog with input fields to Manual Trigger in Flows (#17603)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
This commit is contained in:
@@ -342,6 +342,18 @@ export function getTriggers() {
|
||||
width: 'full' as Width,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'async',
|
||||
name: t('triggers.webhook.async'),
|
||||
type: 'boolean',
|
||||
meta: {
|
||||
width: 'half' as Width,
|
||||
interface: 'toggle',
|
||||
},
|
||||
schema: {
|
||||
default_value: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'location',
|
||||
name: t('location'),
|
||||
@@ -369,18 +381,6 @@ export function getTriggers() {
|
||||
default_value: 'both',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'async',
|
||||
name: t('triggers.webhook.async'),
|
||||
type: 'boolean',
|
||||
meta: {
|
||||
width: 'half' as Width,
|
||||
interface: 'toggle',
|
||||
},
|
||||
schema: {
|
||||
default_value: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'requireSelection',
|
||||
name: t('triggers.manual.collection_page'),
|
||||
@@ -407,6 +407,72 @@ export function getTriggers() {
|
||||
default_value: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'modal',
|
||||
type: 'alias',
|
||||
meta: {
|
||||
interface: 'presentation-divider',
|
||||
width: 'full',
|
||||
options: {
|
||||
title: t('confirmation_dialog'),
|
||||
icon: 'quiz',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'requireConfirmation',
|
||||
name: t('require_confirmation'),
|
||||
type: 'boolean',
|
||||
meta: {
|
||||
interface: 'boolean',
|
||||
width: 'full' as Width,
|
||||
options: {
|
||||
label: t('require_confirmation'),
|
||||
},
|
||||
},
|
||||
schema: {
|
||||
default_value: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'confirmationDescription',
|
||||
name: t('confirmation_description'),
|
||||
type: 'string',
|
||||
meta: {
|
||||
interface: 'system-input-translated-string',
|
||||
options: {
|
||||
placeholder: '$t:run_flow_confirm',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
rule: {
|
||||
requireConfirmation: {
|
||||
_eq: false,
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'fields',
|
||||
name: t('confirmation_input_fields'),
|
||||
type: 'json',
|
||||
meta: {
|
||||
interface: 'system-inline-fields',
|
||||
conditions: [
|
||||
{
|
||||
rule: {
|
||||
requireConfirmation: {
|
||||
_eq: false,
|
||||
},
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user