Added next and previous button text. This allows the developer to set what the next buttons text is. E.g. It will default to Next, but if the user sets $next_button_text ='Step 2', the button will say step 2

This will work the same for the previous button.

Currently no dynamic way to set this.
This commit is contained in:
Jacob Roberts 2014-03-17 11:02:52 +13:00
parent bd2e9ce857
commit 42b8971373

View File

@ -71,7 +71,22 @@ class MultiFormStep extends DataObject {
* @var MultiForm subclass
*/
protected $form;
/**
* Title of the next button (For next step)
*
* @var string
*/
static $next_button_text = 'Next';
/**
* Title of the previous button (For previous step)
*
* @var string
*/
static $previous_button_text = 'Back';
/**
* Form fields to be rendered with this step.
* (Form object is created in {@link MultiForm}.