# Panel (quick_actions)

Set variable values with a button

# Description

With this panel it is possible to render buttons that can set defined values to variables in config. You can also go to next step after action is performed with gonext: true. If you provide callbacks, they are executed after variable assignment.',

# Screenshots

quick_actions

# Config

quick_actions:

	config:

		# Actions
		actions:

			# Index (name1, name2, ...., nameN)
			# Action index must be unique
			[name]:

				# Required | Type: string | Default: null
				# Button caption
				caption: "Set price to 0"

				# Required | Type: array | Default: []
				# Pairs of variable:value to set at button click
				variables: {myvar: "{$myvar}"}

				# Required | Type: string | Default: null
				# Shows confirm box with given text before action is performed
				#
				### Note
				### By default is required no confirmation
				confirm: null

				# Optional | Type: bool | Default: false
				# Try go to next step after action is performed
				gonext: false

				# Optional | Type: string | Default: null
				# Color of button
				#
				### Note
				### By default is used blue
				color: "green"

				# Optional | Type: string | Default: null
				# Custom flash message
				flash: "Thank you {$__user->getFullname()}!"

				# Optional | Type: bool | Default: true
				# Whether button is enabled
				enabled: "{output($myvar === "text")}"

				# Optional | Type: bool | Default: true
				# Whether button should be displayed
				display: "{$myvar === "text" ? 1 : 0}"

				# Button further styling
				theme:

					# Optional | Type: string | Default: null
					# Button text color
					color: "text-white"

					# Optional | Type: string | Default: null
					# Button background color
					background: "bg-indigo-800"

					# Optional | Type: string | Default: null
					# Icon name to display inside button
					icon: "fa/s/home"

					# Optional | Type: string | Default: null
					# Icon color
					iconColor: "white"

					# Optional | Type: string | Default: before
					# Icon position before or after text
					iconPosition: "before"

				# Optional | Type: array | Default: []
				# Custom callbacks attached to the action
				callbacks: []

				# Optional | Type: string | Default: null
				# Custom script attached to the action
				#
				### Note
				### This option is not lattenized
				script: "NULL"

		# UI
		ui:

			# Optional | Type: string | Default: dropdown
			# Render either as a buttons list or a dropdown
			type: "buttons"

			# Actions
			groups:

				# Index (name1, name2, ...., nameN)
				[name]:

					# Required | Type: string | Default: null
					# Group title
					title: "Action group 1"

					# Required | Type: string[] | Default: []
					# Actions to render in this group
					actions: "[action1]"

			# Optional | Type: string | Default: null
			# Panel title
			title: "Panel title"

			# Optional | Type: string | Default: null
			# Panel description
			description: "Panel description"

			# Optional | Type: string | Default: null
			# Button text color
			color: "text-white"

			# Optional | Type: string | Default: null
			# Button background color
			background: "bg-indigo-800"

			# Optional | Type: string | Default: null
			# Icon name to display inside button
			icon: "fa/s/home"

			# Optional | Type: string | Default: null
			# Icon color
			iconColor: "white"

			# Optional | Type: string | Default: before
			# Icon position before or after text
			iconPosition: "before"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

# Examples

# Callbacks

quick_actions:
	config:
		actions:
			action1:
				{...}
				callbacks:
					wall_writer__1:
						config:
							expression: '"Process " ~_process.id~ " marked as done (vol1)"'
							severity: 1
					wall_writer__2:
						config:
							expression: '"Process " ~_process.id~ " marked as done (vol2)"'
							severity: 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14