diff --git a/src/Actions/Action.php b/src/Actions/Action.php index 41e98cb..db71dc3 100644 --- a/src/Actions/Action.php +++ b/src/Actions/Action.php @@ -90,6 +90,27 @@ class Action implements JsonSerializable */ public static $chunkCount = 200; + /** + * The text to be used for the action's confirm button. + * + * @var string + */ + public $confirmButtonText = 'Run Action'; + + /** + * The text to be used for the action's cancel button. + * + * @var string + */ + public $cancelButtonText = 'Cancel'; + + /** + * The text to be used for the action's confirmation text. + * + * @var string + */ + public $confirmText = 'Are you sure you want to run this action?'; + /** * Determine if the action is executable for the given request. * @@ -378,6 +399,9 @@ public function jsonSerialize() 'onlyOnDetail' => $this->onlyOnDetail, 'onlyOnIndex' => $this->onlyOnIndex, 'withoutConfirmation' => $this->withoutConfirmation, + 'cancelButtonText' => __($this->cancelButtonText), + 'confirmButtonText' => __($this->confirmButtonText), + 'confirmText' => __($this->confirmText), ], $this->meta()); } }