Update form.forkbb.php template
This commit is contained in:
parent
3142ba2c3a
commit
2caac06488
21 changed files with 72 additions and 92 deletions
|
@ -137,9 +137,9 @@ class Bans extends Admin
|
|||
],
|
||||
];
|
||||
$form['sets']['search-info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Ban search info'),
|
||||
'message' => 'Ban search info',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -211,10 +211,9 @@ class Categories extends Admin
|
|||
],
|
||||
],
|
||||
'del-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Delete category warn'),
|
||||
'html' => true,
|
||||
'message' => 'Delete category warn',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -80,10 +80,9 @@ class Censoring extends Admin
|
|||
],
|
||||
],
|
||||
'onoff-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Censoring info'),
|
||||
'html' => true,
|
||||
'message' => 'Censoring info',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -165,9 +165,9 @@ class Forums extends Admin
|
|||
foreach ($list as $forum) {
|
||||
if ($cid !== $forum->cat_id) {
|
||||
$form['sets']["category{$forum->cat_id}-info"] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => $forum->cat_name,
|
||||
'message' => $forum->cat_name,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -305,10 +305,9 @@ class Forums extends Admin
|
|||
],
|
||||
],
|
||||
[
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Delete forum warn'),
|
||||
'html' => true,
|
||||
'message' => 'Delete forum warn',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -508,10 +507,9 @@ class Forums extends Admin
|
|||
];
|
||||
|
||||
$form['sets']['forum-info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __(['Group permissions info', $this->c->Router->link('AdminGroups'), __('User groups')]),
|
||||
'html' => true,
|
||||
'message' => ['Group permissions info', $this->c->Router->link('AdminGroups'), __('User groups')],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -501,9 +501,9 @@ class Groups extends Admin
|
|||
'fields' => $fieldset,
|
||||
];
|
||||
$form['sets']['mod-info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Moderator info'),
|
||||
'message' => 'Moderator info',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -643,9 +643,9 @@ class Groups extends Admin
|
|||
'fields' => $fieldset,
|
||||
];
|
||||
$form['sets']['def-info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Group settings info'),
|
||||
'message' => 'Group settings info',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -873,10 +873,9 @@ class Groups extends Admin
|
|||
],
|
||||
];
|
||||
$form['sets']['conf-info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Confirm delete warn'),
|
||||
'html' => true,
|
||||
'message' => 'Confirm delete warn',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -251,13 +251,12 @@ class Install extends Admin
|
|||
],
|
||||
'sets' => [
|
||||
'db-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Database setup'),
|
||||
'html' => true,
|
||||
'message' => 'Database setup',
|
||||
],
|
||||
[
|
||||
'value' => __('Info 1'),
|
||||
'message' => 'Info 1',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -306,13 +305,12 @@ class Install extends Admin
|
|||
],
|
||||
],
|
||||
'adm-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Administration setup'),
|
||||
'html' => true,
|
||||
'message' => 'Administration setup',
|
||||
],
|
||||
[
|
||||
'value' => __('Info 7'),
|
||||
'message' => 'Info 7',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -348,13 +346,12 @@ class Install extends Admin
|
|||
],
|
||||
],
|
||||
'board-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Board setup'),
|
||||
'html' => true,
|
||||
'message' => 'Board setup',
|
||||
],
|
||||
[
|
||||
'value' => __('Info 11'),
|
||||
'message' => 'Info 11',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -395,13 +392,12 @@ class Install extends Admin
|
|||
],
|
||||
],
|
||||
'cookie-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Cookie setup'),
|
||||
'html' => true,
|
||||
'message' => 'Cookie setup',
|
||||
],
|
||||
[
|
||||
'value' => __('Info 12'),
|
||||
'message' => 'Info 12',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -111,10 +111,9 @@ class Maintenance extends Admin
|
|||
],
|
||||
'sets' => [
|
||||
'indx-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Rebuild index info'),
|
||||
'html' => true,
|
||||
'message' => 'Rebuild index info',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -146,10 +145,9 @@ class Maintenance extends Admin
|
|||
],
|
||||
],
|
||||
'indx-info2' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Rebuild completed info'),
|
||||
'html' => true,
|
||||
'message' => 'Rebuild completed info',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -288,9 +288,9 @@ class BBCode extends Parser
|
|||
],
|
||||
'sets' => [
|
||||
'info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __(['BBCode %s', $name]),
|
||||
'message' => ['BBCode %s', $name],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -72,7 +72,7 @@ class Reports extends Admin
|
|||
protected function form(bool $noZapped, array $reports): array
|
||||
{
|
||||
$form = [
|
||||
'sets' => [],
|
||||
'sets' => [],
|
||||
];
|
||||
|
||||
foreach ($reports as $report) {
|
||||
|
@ -133,9 +133,9 @@ class Reports extends Admin
|
|||
|
||||
if (empty($form['sets'])) {
|
||||
$form['sets'][] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => $noZapped ? __('No new reports') : __('No zapped reports'),
|
||||
'message' => $noZapped ? 'No new reports' : 'No zapped reports',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -304,9 +304,9 @@ class Update extends Admin
|
|||
],
|
||||
'sets' => [
|
||||
'update-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Update message'),
|
||||
'message' => 'Update message',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -329,9 +329,9 @@ class Update extends Admin
|
|||
],
|
||||
],
|
||||
'member-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Members message'),
|
||||
'message' => 'Members message',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -190,10 +190,9 @@ class Action extends Users
|
|||
],
|
||||
],
|
||||
'info2' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Delete warning'),
|
||||
'html' => true,
|
||||
'message' => 'Delete warning',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -176,9 +176,9 @@ class View extends Users
|
|||
],
|
||||
];
|
||||
$form['sets']['search-info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('User search info'),
|
||||
'message' => 'User search info',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -105,14 +105,12 @@ class Delete extends Page
|
|||
],
|
||||
'sets' => [
|
||||
'info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __(['Topic %s', $post->parent->name]),
|
||||
'html' => true,
|
||||
'message' => ['Topic %s', $post->parent->name],
|
||||
],
|
||||
[
|
||||
'value' => __([$deleteTopic ? 'Topic by' : 'Reply by', $post->poster, dt($post->posted)]),
|
||||
'html' => true,
|
||||
'message' => [$deleteTopic ? 'Topic by' : 'Reply by', $post->poster, dt($post->posted)],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -161,9 +161,9 @@ class Email extends Page
|
|||
],
|
||||
],
|
||||
'email-info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __('Email disclosure note'),
|
||||
'message' => 'Email disclosure note',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -603,18 +603,16 @@ class Moderate extends Page
|
|||
}
|
||||
|
||||
$form['sets']['info'] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => \implode('<br>', $headers),
|
||||
'html' => true,
|
||||
'html' => \implode('<br>', $headers),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
if ($this->firstTopic instanceof Topic) {
|
||||
$form['sets']['info']['info'][] = [
|
||||
'value' => __(['All posts will be posted in the «%s» topic', $this->firstTopic->name]),
|
||||
'html' => true,
|
||||
$form['sets']['info']['inform'][] = [
|
||||
'message' => ['All posts will be posted in the «%s» topic', $this->firstTopic->name],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -162,10 +162,9 @@ class PMBlock extends AbstractPM
|
|||
],
|
||||
'sets' => [
|
||||
'info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __([$status ? 'Unblock user %s' : 'Block user %s', $user->username]),
|
||||
'html' => true,
|
||||
'message' => [$status ? 'Unblock user %s' : 'Block user %s', $user->username],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -134,18 +134,16 @@ class PMDelete extends AbstractPM
|
|||
],
|
||||
'sets' => [
|
||||
'info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __(['Dialogue %s', $post->parent->name]),
|
||||
'html' => true,
|
||||
'message' => ['Dialogue %s', $post->parent->name],
|
||||
],
|
||||
[
|
||||
'value' => __([
|
||||
'message' => [
|
||||
$deleteTopic ? 'Dialogue by %1$s (%2$s)' : 'Message by %1$s (%2$s)',
|
||||
$post->poster,
|
||||
dt($post->posted)
|
||||
]),
|
||||
'html' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -148,12 +148,12 @@ class PMTopic extends AbstractPM
|
|||
],
|
||||
'sets' => [
|
||||
'info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => __(['Dialogue %s', $this->model->name]),
|
||||
'message' => ['Dialogue %s', $this->model->name],
|
||||
],
|
||||
[
|
||||
'value' => __(['Recipient: %s', $this->targetUser->username]),
|
||||
'message' => ['Recipient: %s', $this->targetUser->username],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -175,10 +175,9 @@ class PMView extends AbstractPM
|
|||
],
|
||||
'sets' => [
|
||||
'info' => [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => \implode('<br>', $headers),
|
||||
'html' => true,
|
||||
'html' => \implode('<br>', $headers),
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -123,9 +123,9 @@ class Mod extends Profile
|
|||
foreach ($list as $forum) {
|
||||
if ($cid !== $forum->cat_id) {
|
||||
$form['sets']["category{$forum->cat_id}-info"] = [
|
||||
'info' => [
|
||||
'inform' => [
|
||||
[
|
||||
'value' => $forum->cat_name,
|
||||
'message' => $forum->cat_name,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<form @if ($form['id']) id="{{ $form['id'] }}" @endif class="f-form" method="post" action="{{ $form['action'] }}" @if ($form['enctype']) enctype="{{ $form['enctype'] }}" @endif>
|
||||
@endif
|
||||
@foreach ($form['sets'] as $setKey => $setVal)
|
||||
@if ($setVal['info'])
|
||||
@foreach ($setVal['info'] as $key => $cur)
|
||||
<p class="f-finform"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
|
||||
@if ($setVal['inform'])
|
||||
@foreach ($setVal['inform'] as $key => $cur)
|
||||
<p class="f-finform">{!! $cur['html'] or __($cur['message']) !!}</p>
|
||||
@endforeach
|
||||
@elseif (isset($setVal['fields']))
|
||||
<fieldset id="id-fs-{{ $setKey }}" @if ($setVal['class']) class="f-fs-{{ \implode(' f-fs-', $setVal['class']) }}" @endif>
|
||||
|
|
Loading…
Add table
Reference in a new issue