mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
Fix placeholder of OptionFormText
This commit is contained in:
parent
abde385776
commit
c9f9a8ddb2
@ -505,7 +505,8 @@ class OptionFormText extends OptionFormItem
|
|||||||
public function placeholder($placeholder = OptionForm::AUTO_DETECT)
|
public function placeholder($placeholder = OptionForm::AUTO_DETECT)
|
||||||
{
|
{
|
||||||
if ($placeholder == OptionForm::AUTO_DETECT) {
|
if ($placeholder == OptionForm::AUTO_DETECT) {
|
||||||
$placeholder = trans("options.$this->parentId.$this->id.placeholder");
|
$key = "options.$this->parentId.$this->id.placeholder";
|
||||||
|
$placeholder = trans()->has($key) ? trans($key) : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->placeholder = $placeholder;
|
$this->placeholder = $placeholder;
|
||||||
@ -601,7 +602,8 @@ class OptionFormGroup extends OptionFormItem
|
|||||||
public function text($id, $value = null, $placeholder = OptionForm::AUTO_DETECT)
|
public function text($id, $value = null, $placeholder = OptionForm::AUTO_DETECT)
|
||||||
{
|
{
|
||||||
if ($placeholder == OptionForm::AUTO_DETECT) {
|
if ($placeholder == OptionForm::AUTO_DETECT) {
|
||||||
$placeholder = trans("options.$this->parentId.$this->id.placeholder");
|
$key = "options.$this->parentId.$this->id.placeholder";
|
||||||
|
$placeholder = trans()->has($key) ? trans($key) : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->items[] = ['type' => 'text', 'id' => $id, 'value' => $value, 'placeholder' => $placeholder];
|
$this->items[] = ['type' => 'text', 'id' => $id, 'value' => $value, 'placeholder' => $placeholder];
|
||||||
|
Loading…
Reference in New Issue
Block a user