2018-03-16

This commit is contained in:
Visman 2018-03-16 19:03:19 +07:00
parent 94c919f59f
commit cf7f17e9d5
8 changed files with 28 additions and 28 deletions

View file

@ -72,7 +72,7 @@ class Categories extends Admin
$fieldset = [];
foreach ($this->c->categories->getList() as $key => $row) {
$fieldset["form[{$key}][cat_name]"] = [
'dl' => ['name', 'inline'],
'class' => ['name', 'inline'],
'type' => 'text',
'maxlength' => 80,
'value' => $row['cat_name'],
@ -80,7 +80,7 @@ class Categories extends Admin
'required' => true,
];
$fieldset["form[{$key}][disp_position]"] = [
'dl' => ['position', 'inline'],
'class' => ['position', 'inline'],
'type' => 'number',
'min' => 0,
'max' => 9999999999,
@ -88,7 +88,7 @@ class Categories extends Admin
'title' => \ForkBB\__('Category position label'),
];
$fieldset[] = [
'dl' => ['delete', 'inline'],
'class' => ['delete', 'inline'],
'type' => 'btn',
'value' => '❌',
'title' => \ForkBB\__('Delete'),
@ -102,7 +102,7 @@ class Categories extends Admin
$form['sets'][] = [
'fields' => [
'new' => [
'dl' => 'new',
'class' => 'new',
'type' => 'text',
'maxlength' => 80,
'title' => \ForkBB\__('Add category label'),

View file

@ -87,14 +87,14 @@ class Censoring extends Admin
$fieldset = [];
foreach ($this->c->censorship->load() as $id => $row) {
$fieldset["form[{$id}][search_for]"] = [
'dl' => ['censor', 'inline'],
'class' => ['censor', 'inline'],
'type' => 'text',
'maxlength' => 60,
'value' => $row['search_for'],
'title' => \ForkBB\__('Censored word label'),
];
$fieldset["form[{$id}][replace_with]"] = [
'dl' => ['censor', 'inline'],
'class' => ['censor', 'inline'],
'type' => 'text',
'maxlength' => 60,
'value' => $row['replace_with'],
@ -102,14 +102,14 @@ class Censoring extends Admin
];
}
$fieldset["form[0][search_for]"] = [
'dl' => ['censor', 'inline'],
'class' => ['censor', 'inline'],
'type' => 'text',
'maxlength' => 60,
'value' => '',
'title' => \ForkBB\__('Censored word label'),
];
$fieldset["form[0][replace_with]"] = [
'dl' => ['censor', 'inline'],
'class' => ['censor', 'inline'],
'type' => 'text',
'maxlength' => 60,
'value' => '',

View file

@ -168,14 +168,14 @@ class Forums extends Admin
}
$fieldset[] = [
'dl' => ['name', 'inline', 'depth' . $forum->depth],
'class' => ['name', 'inline', 'depth' . $forum->depth],
'type' => 'btn',
'value' => $forum->forum_name,
'title' => \ForkBB\__('Forum label'),
'link' => $this->c->Router->link('AdminForumsEdit', ['id' => $forum->id]),
];
$fieldset["form[{$forum->id}][disp_position]"] = [
'dl' => ['position', 'inline'],
'class' => ['position', 'inline'],
'type' => 'number',
'min' => 0,
'max' => 9999999999,
@ -184,7 +184,7 @@ class Forums extends Admin
];
$disabled = (bool) $forum->subforums;
$fieldset[] = [
'dl' => ['delete', 'inline'],
'class' => ['delete', 'inline'],
'type' => 'btn',
'value' => '❌',
'title' => \ForkBB\__('Delete'),
@ -499,7 +499,7 @@ class Forums extends Admin
foreach ($this->c->groups->Perm->get($forum) as $id => $group) {
$fieldset = [];
$fieldset["perms[{$id}][read_forum]"] = [
'dl' => $group->def_read_forum ? $aOn : $aOff,
'class' => $group->def_read_forum ? $aOn : $aOff,
'type' => 'checkbox',
'value' => '1',
'title' => \ForkBB\__('Read forum label'),
@ -508,7 +508,7 @@ class Forums extends Admin
'disabled' => $group->dis_read_forum,
];
$fieldset["perms[{$id}][post_replies]"] = [
'dl' => $group->def_post_replies ? $aOn : $aOff,
'class' => $group->def_post_replies ? $aOn : $aOff,
'type' => 'checkbox',
'value' => '1',
'title' => \ForkBB\__('Post replies label'),
@ -517,7 +517,7 @@ class Forums extends Admin
'disabled' => $group->dis_post_replies,
];
$fieldset["perms[{$id}][post_topics]"] = [
'dl' => $group->def_post_topics ? $aOn : $aOff,
'class' => $group->def_post_topics ? $aOn : $aOff,
'type' => 'checkbox',
'value' => '1',
'title' => \ForkBB\__('Post topics label'),

View file

@ -713,8 +713,8 @@ class Options extends Admin
'info' => \ForkBB\__('Rules help'),
],
'o_default_email_setting' => [
'class' => 'block',
'type' => 'radio',
'dl' => 'block',
'value' => $config->o_default_email_setting,
'values' => [
0 => \ForkBB\__('Display e-mail label'),

View file

@ -48,7 +48,7 @@ trait PostFormTrait
$fieldset = [];
if ($this->user->isGuest) {
$fieldset['username'] = [
'dl' => 'w1',
'class' => 'w1',
'type' => 'text',
'maxlength' => 25,
'title' => \ForkBB\__('Username'),
@ -58,7 +58,7 @@ trait PostFormTrait
'autofocus' => $autofocus,
];
$fieldset['email'] = [
'dl' => 'w2',
'class' => 'w2',
'type' => 'text',
'maxlength' => 80,
'title' => \ForkBB\__('Email'),

View file

@ -150,7 +150,7 @@ class Search extends Page
'html' => true,
],
'keywords' => [
'dl' => 'w2',
'class' => 'w2',
'type' => 'text',
'maxlength' => 100,
'title' => \ForkBB\__('Keyword search'),
@ -159,7 +159,7 @@ class Search extends Page
'autofocus' => true,
],
'author' => [
'dl' => 'w1',
'class' => 'w1',
'type' => 'text',
'maxlength' => 25,
'title' => \ForkBB\__('Author search'),
@ -176,7 +176,7 @@ class Search extends Page
'legend' => \ForkBB\__('Search in legend'),
'fields' => [
'forums' => [
'dl' => 'w3',
'class' => 'w3',
'type' => 'multiselect',
'options' => $this->listForOptions,
'value' => $v ? \explode('.', $v->forums) : null,
@ -184,7 +184,7 @@ class Search extends Page
'size' => \min(\count($this->listForOptions), 10),
],
'serch_in' => [
'dl' => 'w3',
'class' => 'w3',
'type' => 'select',
'options' => [
0 => \ForkBB\__('Message and subject'),
@ -209,7 +209,7 @@ class Search extends Page
'legend' => \ForkBB\__('Search results legend'),
'fields' => [
'sort_by' => [
'dl' => 'w4',
'class' => 'w4',
'type' => 'select',
'options' => [
0 => \ForkBB\__('Sort by post time'),
@ -221,7 +221,7 @@ class Search extends Page
'title' => \ForkBB\__('Sort by'),
],
'sort_dir' => [
'dl' => 'w4',
'class' => 'w4',
'type' => 'radio',
'values' => [
0 => \ForkBB\__('Descending'),
@ -231,7 +231,7 @@ class Search extends Page
'title' => \ForkBB\__('Sort order'),
],
'show_as' => [
'dl' => 'w4',
'class' => 'w4',
'type' => 'radio',
'values' => [
0 => \ForkBB\__('Show as posts'),

View file

@ -143,7 +143,7 @@ class Userlist extends Page
$form['hidden']['name'] = '*';
}
$fields['group'] = [
'dl' => 'w4',
'class' => 'w4',
'type' => 'select',
'options' => [[-1, \ForkBB\__('All users')]] + \array_map(function ($group) {
return [$group->g_id, $group->g_title];
@ -152,7 +152,7 @@ class Userlist extends Page
'title' => \ForkBB\__('User group'),
];
$fields['sort'] = [
'dl' => 'w4',
'class' => 'w4',
'type' => 'select',
'options' => [
['username', \ForkBB\__('Sort by name')],
@ -163,7 +163,7 @@ class Userlist extends Page
'title' => \ForkBB\__('Sort users by'),
];
$fields['dir'] = [
'dl' => 'w4',
'class' => 'w4',
'type' => 'radio',
'value' => $v->dir ?: 'ASC',
'values' => [

View file

@ -18,7 +18,7 @@
@if ('info' === $cur['type'])
<p class="f-child6"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
@else
<dl @if ($cur['dl']) class="f-field-{!! implode(' f-field-', (array) $cur['dl']) !!}" @endif>
<dl @if ($cur['class']) class="f-field-{!! implode(' f-field-', (array) $cur['class']) !!}" @endif>
<dt> @if ($cur['title'])<label class="f-child1 @if ($cur['required']) f-req @endif" @if (is_string($key) && 'radio' !== $cur['type']) for="id-{{ $key }}" @endif>{!! $cur['title'] !!}</label> @endif</dt>
<dd>
@if ('text' === $cur['type'])