# quick_actions

Name quick_actions
Type panel
Version 1.0
Since 2020-01-01

# Prologue

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.

# Preview

# Configuration

quick_actions:
	render: {width: 8}
	config:

		actions:
			# Unique button ID
			action1:

				# Required
				# Button's caption
				caption: Set price to $500

				# Required
				# Array of variables and values pair to set at button click
				variables: {connection.price: 500, customer.notify: false}

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

				# Optional | Default - null => blue default color
				# Css colors
				color: green

				# Optional | Default - null => without confirmation
				# Shows confirm box before action is performed
				confirm: "Set price to $500?"

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

				# Optional | Default - null
				# Show be button displayed?
				# LPL support
				display: "variable === 1"

				# Optional | Default - null
				# Is button enabled or disabled?
				# LPL support
				enabled: "variable === 1"

				# Optional | Default - []]
				# Custom callbacks attached to this action button
				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

			# Unique button ID
			action2:

				# Required
				# Button's caption
				caption: Set price to $1500

				# Required
				# Array of variables and values pair to set at button click
				variables: {connection.price: 1500, customer.notify: true}

		ui:
			# Optional | Default - null
			# Panel title
			title: Upload files

			# Optional | Default - null
			# Panel description
			description: Description of the panel

			# Optional | Default - buttons
			# Render either as a buttons list or a dropdown list
			# Values: dropdown | buttons
			type: buttons
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

# Tips

If you provide callbacks, they are executed after variable assignment.