Fix type of 'legend' in forms

This commit is contained in:
Visman 2021-11-20 14:30:47 +07:00
parent 1478a09b35
commit ca12c38f2d
3 changed files with 7 additions and 7 deletions

View file

@ -71,7 +71,7 @@ class Bans extends Admin
$this->nameTpl = 'admin/bans';
$this->formBanPage = 'AdminBansNew';
$this->formBanHead = 'New ban head';
$this->formBanSubHead = __('Add ban subhead');
$this->formBanSubHead = 'Add ban subhead';
if ('POST' === $method) {
$v = $this->c->Validator->reset()
@ -515,7 +515,7 @@ class Bans extends Admin
$form['sets']["l{$number}"] = [
'class' => ['result'],
'legend' => $number,
'legend' => (string) $number,
'fields' => $fields,
];
@ -577,7 +577,7 @@ class Bans extends Admin
$this->nameTpl = 'admin/bans';
$this->formBanPage = 'AdminBansNew';
$this->formBanHead = 'New ban head';
$this->formBanSubHead = __('Add ban subhead');
$this->formBanSubHead = 'Add ban subhead';
return $this->ban(true, $args, $method, $userList);
}
@ -605,7 +605,7 @@ class Bans extends Admin
$this->nameTpl = 'admin/bans';
$this->formBanPage = 'AdminBansEdit';
$this->formBanHead = 'Edit ban head';
$this->formBanSubHead = __('Edit ban subhead');
$this->formBanSubHead = 'Edit ban subhead';
return $this->ban(false, $args, $method, $userList, $ban);
}
@ -711,7 +711,7 @@ class Bans extends Admin
$this->aCrumbs[] = [
$this->c->Router->link($this->formBanPage, $args),
$this->formBanSubHead,
__($this->formBanSubHead),
];
$this->formBan = $this->formBan($data, $args);

View file

@ -346,7 +346,7 @@ class Result extends Users
];
$form['sets']["l{$number}"] = [
'class' => ['result'],
'legend' => -1 === $user->id ? null : $number,
'legend' => -1 === $user->id ? null : (string) $number,
'fields' => $fields,
];

View file

@ -126,7 +126,7 @@ class Stat extends Users
$form['sets']["l{$number}"] = [
'class' => ['result', 'stat'],
'legend' => $flag ? $number : null,
'legend' => $flag ? (string) $number : null,
'fields' => $fields,
];