Move prompt to lang
Move default prompt text to i18n file.
This commit is contained in:
parent
c1fe12f732
commit
06b7031131
|
|
@ -21,7 +21,7 @@ class Repeater extends FormWidgetBase
|
|||
/**
|
||||
* @var string Prompt text for adding new items.
|
||||
*/
|
||||
public $prompt = 'Add new item';
|
||||
public $prompt;
|
||||
|
||||
/**
|
||||
* @var bool Items can be sorted.
|
||||
|
|
@ -97,6 +97,8 @@ class Repeater extends FormWidgetBase
|
|||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->prompt = Lang::get('backend::lang.repeater.add_new_item');
|
||||
|
||||
$this->fillFromConfig([
|
||||
'form',
|
||||
'prompt',
|
||||
|
|
|
|||
|
|
@ -239,6 +239,7 @@ return [
|
|||
'remove_file' => 'Remove file'
|
||||
],
|
||||
'repeater' => [
|
||||
'add_new_item' => 'Add new item',
|
||||
'min_items_failed' => ':name requires a minimum of :min items, only :items were provided',
|
||||
'max_items_failed' => ':name only allows up to :max items, :items were provided',
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue