2018-04-15

This commit is contained in:
Visman 2018-04-15 18:19:24 +07:00
parent 461a764d62
commit 6f603fd923
19 changed files with 120 additions and 183 deletions

View file

@ -95,11 +95,11 @@ class Categories extends Admin
'link' => $this->c->Router->link('AdminCategoriesDelete', ['id' => $key]), 'link' => $this->c->Router->link('AdminCategoriesDelete', ['id' => $key]),
]; ];
} }
$form['sets'][] = [ $form['sets']['cats'] = [
'class' => 'inline', 'class' => 'inline',
'fields' => $fieldset, 'fields' => $fieldset,
]; ];
$form['sets'][] = [ $form['sets']['new-cat'] = [
'fields' => [ 'fields' => [
'new' => [ 'new' => [
'class' => 'new', 'class' => 'new',
@ -186,7 +186,7 @@ class Categories extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['del'] = [
'fields' => [ 'fields' => [
'confirm' => [ 'confirm' => [
'caption' => \ForkBB\__('Confirm delete'), 'caption' => \ForkBB\__('Confirm delete'),
@ -197,7 +197,7 @@ class Categories extends Admin
], ],
], ],
]; ];
$form['sets'][] = [ $form['sets']['del-info'] = [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????

View file

@ -54,7 +54,7 @@ class Censoring extends Admin
'token' => $this->c->Csrf->create('AdminCensoring'), 'token' => $this->c->Csrf->create('AdminCensoring'),
], ],
'sets' => [ 'sets' => [
[ 'onoff' => [
'fields' => [ 'fields' => [
'o_censoring' => [ 'o_censoring' => [
'type' => 'radio', 'type' => 'radio',
@ -65,7 +65,7 @@ class Censoring extends Admin
], ],
], ],
], ],
[ 'onoff-info' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -116,7 +116,7 @@ class Censoring extends Admin
'caption' => \ForkBB\__('Replacement label'), 'caption' => \ForkBB\__('Replacement label'),
]; ];
$form['sets'][] = [ $form['sets']['cens'] = [
'class' => 'inline', 'class' => 'inline',
'fields' => $fieldset, 'fields' => $fieldset,
]; ];

View file

@ -149,14 +149,14 @@ class Forums extends Admin
foreach ($list as $forum) { foreach ($list as $forum) {
if ($cid !== $forum->cat_id) { if ($cid !== $forum->cat_id) {
if (null !== $cid) { if (null !== $cid) {
$form['sets'][] = [ $form['sets']["cat{$cid}"] = [
'class' => 'inline', 'class' => 'inline',
'fields' => $fieldset, 'fields' => $fieldset,
]; ];
$fieldset = []; $fieldset = [];
} }
$form['sets'][] = [ $form['sets']["cat{$forum->cat_id}-info"] = [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -167,7 +167,7 @@ class Forums extends Admin
$cid = $forum->cat_id; $cid = $forum->cat_id;
} }
$fieldset[] = [ $fieldset["forum{$forum->id}"] = [
'class' => ['name', 'adm-inline', 'depth' . $forum->depth], 'class' => ['name', 'adm-inline', 'depth' . $forum->depth],
'type' => 'btn', 'type' => 'btn',
'value' => $forum->forum_name, 'value' => $forum->forum_name,
@ -183,7 +183,7 @@ class Forums extends Admin
'caption' => \ForkBB\__('Position label'), 'caption' => \ForkBB\__('Position label'),
]; ];
$disabled = (bool) $forum->subforums; $disabled = (bool) $forum->subforums;
$fieldset[] = [ $fieldset["forum{$forum->id}-del"] = [
'class' => ['delete', 'adm-inline'], 'class' => ['delete', 'adm-inline'],
'type' => 'btn', 'type' => 'btn',
'value' => '❌', 'value' => '❌',
@ -193,7 +193,7 @@ class Forums extends Admin
]; ];
} }
$form['sets'][] = [ $form['sets']["cat{$cid}"] = [
'class' => 'inline', 'class' => 'inline',
'fields' => $fieldset, 'fields' => $fieldset,
]; ];
@ -441,7 +441,7 @@ class Forums extends Admin
'accesskey' => 's', 'accesskey' => 's',
]; ];
$form['sets'][] = [ $form['sets']['forum'] = [
'fields' => [ 'fields' => [
'forum_name' => [ 'forum_name' => [
'type' => 'text', 'type' => 'text',
@ -484,7 +484,7 @@ class Forums extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['forum-info'] = [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -526,7 +526,7 @@ class Forums extends Admin
'disabled' => $group->dis_post_topics, 'disabled' => $group->dis_post_topics,
]; ];
$form['sets'][] = [ $form['sets']["perms{$id}"] = [
'class' => 'inline', 'class' => 'inline',
'legend' => \ForkBB\e($group->g_title), 'legend' => \ForkBB\e($group->g_title),
'fields' => $fieldset, 'fields' => $fieldset,

View file

@ -56,18 +56,20 @@ class Groups extends Admin
'hidden' => [ 'hidden' => [
'token' => $this->c->Csrf->create('AdminGroupsNew'), 'token' => $this->c->Csrf->create('AdminGroupsNew'),
], ],
'sets' => [[ 'sets' => [
'fields' => [ 'base' => [
'basegroup' => [ 'fields' => [
'type' => 'select', 'basegroup' => [
'options' => $this->groupsNew, 'type' => 'select',
'value' => $this->c->config->o_default_user_group, 'options' => $this->groupsNew,
'caption' => \ForkBB\__('New group label'), 'value' => $this->c->config->o_default_user_group,
'info' => \ForkBB\__('New group help'), 'caption' => \ForkBB\__('New group label'),
# 'autofocus' => true, 'info' => \ForkBB\__('New group help'),
# 'autofocus' => true,
],
], ],
], ],
]], ],
'btns' => [ 'btns' => [
'submit' => [ 'submit' => [
'type' => 'submit', 'type' => 'submit',
@ -81,17 +83,19 @@ class Groups extends Admin
'hidden' => [ 'hidden' => [
'token' => $this->c->Csrf->create('AdminGroupsDefault'), 'token' => $this->c->Csrf->create('AdminGroupsDefault'),
], ],
'sets' => [[ 'sets' => [
'fields' => [ 'del' => [
'defaultgroup' => [ 'fields' => [
'type' => 'select', 'defaultgroup' => [
'options' => $this->groupsDefault, 'type' => 'select',
'value' => $this->c->config->o_default_user_group, 'options' => $this->groupsDefault,
'caption' => \ForkBB\__('Default group label'), 'value' => $this->c->config->o_default_user_group,
'info' => \ForkBB\__('Default group help'), 'caption' => \ForkBB\__('Default group label'),
'info' => \ForkBB\__('Default group help'),
],
], ],
], ],
]], ],
'btns' => [ 'btns' => [
'submit' => [ 'submit' => [
'type' => 'submit', 'type' => 'submit',
@ -337,7 +341,7 @@ class Groups extends Admin
]; ];
if (! $group->groupAdmin) { if (! $group->groupAdmin) {
$form['sets'][] = [ $form['sets']['def-info'] = [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -365,7 +369,7 @@ class Groups extends Admin
]; ];
if ($group->groupAdmin) { if ($group->groupAdmin) {
$form['sets'][] = [ $form['sets']['group-data'] = [
'fields' => $fieldset, 'fields' => $fieldset,
]; ];
return $form; return $form;
@ -581,12 +585,12 @@ class Groups extends Admin
]; ];
} }
$form['sets'][] = [ $form['sets']['group-data'] = [
'fields' => $fieldset, 'fields' => $fieldset,
]; ];
if (! empty($group->g_moderator)) { if (! empty($group->g_moderator)) {
$form['sets'][] = [ $form['sets']['mod-info'] = [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -682,7 +686,7 @@ class Groups extends Admin
]; ];
if ($count) { if ($count) {
$form['sets'][] = [ $form['sets']['move'] = [
'fields' => [ 'fields' => [
'movegroup' => [ 'movegroup' => [
'type' => 'select', 'type' => 'select',
@ -695,7 +699,7 @@ class Groups extends Admin
]; ];
} }
$form['sets'][] = [ $form['sets']['conf'] = [
'fields' => [ 'fields' => [
'confirm' => [ 'confirm' => [
'caption' => \ForkBB\__('Confirm delete'), 'caption' => \ForkBB\__('Confirm delete'),
@ -706,7 +710,7 @@ class Groups extends Admin
], ],
], ],
]; ];
$form['sets'][] = [ $form['sets']['conf-info'] = [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????

View file

@ -56,7 +56,7 @@ class Maintenance extends Admin
'token' => $this->c->Csrf->create('AdminMaintenance'), 'token' => $this->c->Csrf->create('AdminMaintenance'),
], ],
'sets' => [ 'sets' => [
[ 'maint' => [
'fields' => [ 'fields' => [
'o_maintenance' => [ 'o_maintenance' => [
'type' => 'radio', 'type' => 'radio',
@ -89,7 +89,7 @@ class Maintenance extends Admin
'token' => $this->c->Csrf->create('AdminMaintenanceRebuild'), 'token' => $this->c->Csrf->create('AdminMaintenanceRebuild'),
], ],
'sets' => [ 'sets' => [
[ 'indx-info' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -98,7 +98,7 @@ class Maintenance extends Admin
], ],
], ],
], ],
[ 'indx' => [
'fields' => [ 'fields' => [
'limit' => [ 'limit' => [
'type' => 'number', 'type' => 'number',
@ -125,7 +125,7 @@ class Maintenance extends Admin
], ],
], ],
], ],
[ 'indx-info2' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????

View file

@ -208,7 +208,7 @@ class Options extends Admin
$styles = $this->c->Func->getStyles(); $styles = $this->c->Func->getStyles();
$styles = \array_combine($styles, $styles); $styles = \array_combine($styles, $styles);
$form['sets'][] = [ $form['sets']['essentials'] = [
'legend' => \ForkBB\__('Essentials subhead'), 'legend' => \ForkBB\__('Essentials subhead'),
'fields' => [ 'fields' => [
'o_board_title' => [ 'o_board_title' => [
@ -302,7 +302,7 @@ class Options extends Admin
$time = \ForkBB\dt($timestamp, false, $config->o_date_format, $config->o_time_format, true, true); $time = \ForkBB\dt($timestamp, false, $config->o_date_format, $config->o_time_format, true, true);
$date = \ForkBB\dt($timestamp, true, $config->o_date_format, $config->o_time_format, false, true); $date = \ForkBB\dt($timestamp, true, $config->o_date_format, $config->o_time_format, false, true);
$form['sets'][] = [ $form['sets']['timeouts'] = [
'legend' => \ForkBB\__('Timeouts subhead'), 'legend' => \ForkBB\__('Timeouts subhead'),
'fields' => [ 'fields' => [
'o_time_format' => [ 'o_time_format' => [
@ -348,7 +348,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['display'] = [
'legend' => \ForkBB\__('Display subhead'), 'legend' => \ForkBB\__('Display subhead'),
'fields' => [ 'fields' => [
'o_show_user_info' => [ 'o_show_user_info' => [
@ -437,7 +437,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['features'] = [
'legend' => \ForkBB\__('Features subhead'), 'legend' => \ForkBB\__('Features subhead'),
'fields' => [ 'fields' => [
'o_quickpost' => [ 'o_quickpost' => [
@ -499,7 +499,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['feed'] = [
'legend' => \ForkBB\__('Feed subhead'), 'legend' => \ForkBB\__('Feed subhead'),
'fields' => [ 'fields' => [
'o_feed_type' => [ 'o_feed_type' => [
@ -530,7 +530,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['reports'] = [
'legend' => \ForkBB\__('Reports subhead'), 'legend' => \ForkBB\__('Reports subhead'),
'fields' => [ 'fields' => [
'o_report_method' => [ 'o_report_method' => [
@ -553,7 +553,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['avatars'] = [
'legend' => \ForkBB\__('Avatars subhead'), 'legend' => \ForkBB\__('Avatars subhead'),
'fields' => [ 'fields' => [
'o_avatars' => [ 'o_avatars' => [
@ -598,7 +598,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['email'] = [
'legend' => \ForkBB\__('E-mail subhead'), 'legend' => \ForkBB\__('E-mail subhead'),
'fields' => [ 'fields' => [
'o_admin_email' => [ 'o_admin_email' => [
@ -668,7 +668,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['registration'] = [
'legend' => \ForkBB\__('Registration subhead'), 'legend' => \ForkBB\__('Registration subhead'),
'fields' => [ 'fields' => [
'o_regs_allow' => [ 'o_regs_allow' => [
@ -720,7 +720,7 @@ class Options extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['announcement'] = [
'legend' => \ForkBB\__('Announcement subhead'), 'legend' => \ForkBB\__('Announcement subhead'),
'fields' => [ 'fields' => [
'o_announcement' => [ 'o_announcement' => [

View file

@ -96,7 +96,7 @@ class Permissions extends Admin
$yn = [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')]; $yn = [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')];
$form['sets'][] = [ $form['sets']['posting'] = [
'legend' => \ForkBB\__('Posting subhead'), 'legend' => \ForkBB\__('Posting subhead'),
'fields' => [ 'fields' => [
'p_message_bbcode' => [ 'p_message_bbcode' => [
@ -137,7 +137,7 @@ class Permissions extends Admin
], ],
]; ];
$form['sets'][] = [ $form['sets']['signatures'] = [
'legend' => \ForkBB\__('Signatures subhead'), 'legend' => \ForkBB\__('Signatures subhead'),
'fields' => [ 'fields' => [
'p_sig_bbcode' => [ 'p_sig_bbcode' => [

View file

@ -76,7 +76,7 @@ class Delete extends Page
'token' => $this->c->Csrf->create('DeletePost', ['id' => $post->id]), 'token' => $this->c->Csrf->create('DeletePost', ['id' => $post->id]),
], ],
'sets' => [ 'sets' => [
[ 'info' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -89,7 +89,7 @@ class Delete extends Page
], ],
], ],
], ],
[ 'confirm' => [
'fields' => [ 'fields' => [
'confirm' => [ 'confirm' => [
'type' => 'checkbox', 'type' => 'checkbox',

View file

@ -179,7 +179,7 @@ class Install extends Page
'token' => $this->c->Csrf->create('Install'), 'token' => $this->c->Csrf->create('Install'),
], ],
'sets' => [ 'sets' => [
[ 'dlang' => [
'fields' => [ 'fields' => [
'installlang' => [ 'installlang' => [
'type' => 'select', 'type' => 'select',
@ -207,7 +207,7 @@ class Install extends Page
'installlang' => $this->user->language, 'installlang' => $this->user->language,
], ],
'sets' => [ 'sets' => [
[ 'db-info' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -220,7 +220,7 @@ class Install extends Page
], ],
], ],
], ],
[ 'db' => [
'fields' => [ 'fields' => [
'dbtype' => [ 'dbtype' => [
'type' => 'select', 'type' => 'select',
@ -264,7 +264,7 @@ class Install extends Page
], ],
], ],
], ],
[ 'adm-info' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -277,7 +277,7 @@ class Install extends Page
], ],
], ],
], ],
[ 'adm' => [
'fields' => [ 'fields' => [
'username' => [ 'username' => [
'type' => 'text', 'type' => 'text',
@ -308,7 +308,7 @@ class Install extends Page
], ],
], ],
[ 'board-info' => [
'info' => [ 'info' => [
'info1' => [ 'info1' => [
'type' => '', //???? 'type' => '', //????
@ -321,7 +321,7 @@ class Install extends Page
], ],
], ],
], ],
[ 'board' => [
'fields' => [ 'fields' => [
'title' => [ 'title' => [
'type' => 'text', 'type' => 'text',

View file

@ -94,7 +94,7 @@ trait PostFormTrait
], ],
'autofocus' => $autofocus, 'autofocus' => $autofocus,
]; ];
$form['sets'][] = [ $form['sets']['uesm'] = [
'fields' => $fieldset, 'fields' => $fieldset,
]; ];
$autofocus = null; $autofocus = null;
@ -140,7 +140,7 @@ trait PostFormTrait
]; ];
} }
if ($fieldset) { if ($fieldset) {
$form['sets'][] = [ $form['sets']['sett'] = [
'legend' => \ForkBB\__('Options'), 'legend' => \ForkBB\__('Options'),
'fields' => $fieldset, 'fields' => $fieldset,
]; ];

View file

@ -55,7 +55,7 @@ abstract class Profile extends Page
} }
/** /**
* Возвращает хлеьные крошки * Возвращает хлебные крошки
* *
* @param mixed ...$args * @param mixed ...$args
* *

View file

@ -121,27 +121,23 @@ class Config extends Profile
$dateFormat[$key] = \ForkBB\dt(\time(), true, $value, null, false, true) . ($key ? '' : ' (' . \ForkBB\__('Default') . ')'); $dateFormat[$key] = \ForkBB\dt(\time(), true, $value, null, false, true) . ($key ? '' : ' (' . \ForkBB\__('Default') . ')');
} }
$form['sets'][] = [ $form['sets']['essentials'] = [
'id' => 'essentials',
'legend' => \ForkBB\__('Essentials'), 'legend' => \ForkBB\__('Essentials'),
'class' => 'data-edit', 'class' => 'data-edit',
'fields' => [ 'fields' => [
'language' => [ 'language' => [
'id' => 'language',
'type' => 'select', 'type' => 'select',
'options' => $langs, 'options' => $langs,
'value' => $this->curUser->language, 'value' => $this->curUser->language,
'caption' => \ForkBB\__('Language'), 'caption' => \ForkBB\__('Language'),
], ],
'style' => [ 'style' => [
'id' => 'style',
'type' => 'select', 'type' => 'select',
'options' => $styles, 'options' => $styles,
'value' => $this->curUser->style, 'value' => $this->curUser->style,
'caption' => \ForkBB\__('Style'), 'caption' => \ForkBB\__('Style'),
], ],
'timezone' => [ 'timezone' => [
'id' => 'timezone',
'type' => 'select', 'type' => 'select',
'options' => [ 'options' => [
'-12' => \ForkBB\__('UTC-12:00'), '-12' => \ForkBB\__('UTC-12:00'),
@ -189,7 +185,6 @@ class Config extends Profile
'caption' => \ForkBB\__('Time zone'), 'caption' => \ForkBB\__('Time zone'),
], ],
'dst' => [ 'dst' => [
'id' => 'dst',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->dst, 'value' => $this->curUser->dst,
'values' => $yn, 'values' => $yn,
@ -197,14 +192,12 @@ class Config extends Profile
'info' => \ForkBB\__('DST help'), 'info' => \ForkBB\__('DST help'),
], ],
'time_format' => [ 'time_format' => [
'id' => 'time_format',
'type' => 'select', 'type' => 'select',
'options' => $timeFormat, 'options' => $timeFormat,
'value' => $this->curUser->time_format, 'value' => $this->curUser->time_format,
'caption' => \ForkBB\__('Time format'), 'caption' => \ForkBB\__('Time format'),
], ],
'date_format' => [ 'date_format' => [
'id' => 'date_format',
'type' => 'select', 'type' => 'select',
'options' => $dateFormat, 'options' => $dateFormat,
'value' => $this->curUser->date_format, 'value' => $this->curUser->date_format,
@ -213,13 +206,11 @@ class Config extends Profile
], ],
]; ];
$form['sets'][] = [ $form['sets']['viewing-posts'] = [
'id' => 'viewing-posts',
'legend' => \ForkBB\__('Viewing posts'), 'legend' => \ForkBB\__('Viewing posts'),
'class' => 'data-edit', 'class' => 'data-edit',
'fields' => [ 'fields' => [
'show_smilies' => [ 'show_smilies' => [
'id' => 'show_smilies',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->show_smilies, 'value' => $this->curUser->show_smilies,
'values' => $yn, 'values' => $yn,
@ -227,7 +218,6 @@ class Config extends Profile
'info' => \ForkBB\__('Smilies info'), 'info' => \ForkBB\__('Smilies info'),
], ],
'show_sig' => [ 'show_sig' => [
'id' => 'show_sig',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->show_sig, 'value' => $this->curUser->show_sig,
'values' => $yn, 'values' => $yn,
@ -235,7 +225,6 @@ class Config extends Profile
'info' => \ForkBB\__('Sigs info'), 'info' => \ForkBB\__('Sigs info'),
], ],
'show_avatars' => [ 'show_avatars' => [
'id' => 'show_avatars',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->show_avatars, 'value' => $this->curUser->show_avatars,
'values' => $yn, 'values' => $yn,
@ -243,7 +232,6 @@ class Config extends Profile
'info' => \ForkBB\__('Avatars info'), 'info' => \ForkBB\__('Avatars info'),
], ],
'show_img' => [ 'show_img' => [
'id' => 'show_img',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->show_img, 'value' => $this->curUser->show_img,
'values' => $yn, 'values' => $yn,
@ -251,7 +239,6 @@ class Config extends Profile
'info' => \ForkBB\__('Images info'), 'info' => \ForkBB\__('Images info'),
], ],
'show_img_sig' => [ 'show_img_sig' => [
'id' => 'show_img_sig',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->show_img_sig, 'value' => $this->curUser->show_img_sig,
'values' => $yn, 'values' => $yn,
@ -260,13 +247,11 @@ class Config extends Profile
], ],
], ],
]; ];
$form['sets'][] = [ $form['sets']['pagination'] = [
'id' => 'pagination',
'legend' => \ForkBB\__('Pagination'), 'legend' => \ForkBB\__('Pagination'),
'class' => 'data-edit', 'class' => 'data-edit',
'fields' => [ 'fields' => [
'disp_topics' => [ 'disp_topics' => [
'id' => 'disp_topics',
'type' => 'number', 'type' => 'number',
'min' => 10, 'min' => 10,
'max' => 50, 'max' => 50,
@ -275,7 +260,6 @@ class Config extends Profile
'info' => \ForkBB\__('For default'), 'info' => \ForkBB\__('For default'),
], ],
'disp_posts' => [ 'disp_posts' => [
'id' => 'disp_posts',
'type' => 'number', 'type' => 'number',
'min' => 10, 'min' => 10,
'max' => 50, 'max' => 50,

View file

@ -206,7 +206,6 @@ class Edit extends Profile
]; ];
if ($this->rules->rename) { if ($this->rules->rename) {
$fields['username'] = [ $fields['username'] = [
'id' => 'username',
'type' => 'text', 'type' => 'text',
'maxlength' => 25, 'maxlength' => 25,
'caption' => \ForkBB\__('Username'), 'caption' => \ForkBB\__('Username'),
@ -216,7 +215,6 @@ class Edit extends Profile
]; ];
} else { } else {
$fields['username'] = [ $fields['username'] = [
'id' => 'username',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Username'), 'caption' => \ForkBB\__('Username'),
@ -224,8 +222,7 @@ class Edit extends Profile
]; ];
} }
if ($this->rules->editPass) { if ($this->rules->editPass) {
$fields[] = [ $fields['change_pass'] = [
'id' => 'change_pass',
'type' => 'link', 'type' => 'link',
'value' => \ForkBB\__('Change passphrase'), 'value' => \ForkBB\__('Change passphrase'),
'href' => $this->c->Router->link('EditUserPass', ['id' => $this->curUser->id]), 'href' => $this->c->Router->link('EditUserPass', ['id' => $this->curUser->id]),
@ -233,7 +230,6 @@ class Edit extends Profile
} }
if ($this->rules->setTitle) { if ($this->rules->setTitle) {
$fields['title'] = [ $fields['title'] = [
'id' => 'title',
'type' => 'text', 'type' => 'text',
'maxlength' => 50, 'maxlength' => 50,
'caption' => \ForkBB\__('Title'), 'caption' => \ForkBB\__('Title'),
@ -242,7 +238,6 @@ class Edit extends Profile
]; ];
} else { } else {
$fields['title'] = [ $fields['title'] = [
'id' => 'title',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Title'), 'caption' => \ForkBB\__('Title'),
@ -255,7 +250,6 @@ class Edit extends Profile
if ($this->rules->useAvatar) { if ($this->rules->useAvatar) {
if (! $this->curUser->avatar) { if (! $this->curUser->avatar) {
$fields['avatar'] = [ $fields['avatar'] = [
'id' => 'avatar',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Avatar'), 'caption' => \ForkBB\__('Avatar'),
@ -263,7 +257,6 @@ class Edit extends Profile
]; ];
} elseif ($this->curUser->avatar) { } elseif ($this->curUser->avatar) {
$fields['avatar'] = [ $fields['avatar'] = [
'id' => 'avatar',
'type' => 'yield', 'type' => 'yield',
'caption' => \ForkBB\__('Avatar'), 'caption' => \ForkBB\__('Avatar'),
'value' => 'avatar', 'value' => 'avatar',
@ -275,7 +268,6 @@ class Edit extends Profile
if ($this->curUser->avatar) { if ($this->curUser->avatar) {
$fields['delete_avatar'] = [ $fields['delete_avatar'] = [
'id' => 'delete_avatar',
'type' => 'checkbox', 'type' => 'checkbox',
'label' => \ForkBB\__('Delete avatar'), 'label' => \ForkBB\__('Delete avatar'),
'value' => '1', 'value' => '1',
@ -284,7 +276,6 @@ class Edit extends Profile
} }
$fields['upload_avatar'] = [ $fields['upload_avatar'] = [
'id' => 'upload_avatar',
'type' => 'file', 'type' => 'file',
'caption' => \ForkBB\__('New avatar'), 'caption' => \ForkBB\__('New avatar'),
'info' => \ForkBB\__('New avatar info', 'info' => \ForkBB\__('New avatar info',
@ -295,8 +286,7 @@ class Edit extends Profile
), ),
]; ];
} }
$form['sets'][] = [ $form['sets']['header'] = [
'id' => 'header',
'class' => 'header-edit', 'class' => 'header-edit',
# 'legend' => \ForkBB\__('Options'), # 'legend' => \ForkBB\__('Options'),
'fields' => $fields, 'fields' => $fields,
@ -304,13 +294,11 @@ class Edit extends Profile
// примечание администрации // примечание администрации
if ($this->user->isAdmMod) { if ($this->user->isAdmMod) {
$form['sets'][] = [ $form['sets']['note'] = [
'id' => 'note',
'class' => 'data-edit', 'class' => 'data-edit',
'legend' => \ForkBB\__('Admin note'), 'legend' => \ForkBB\__('Admin note'),
'fields' => [ 'fields' => [
'admin_note' => [ 'admin_note' => [
'id' => 'admin_note',
'type' => 'text', 'type' => 'text',
'maxlength' => 30, 'maxlength' => 30,
'caption' => \ForkBB\__('Admin note'), 'caption' => \ForkBB\__('Admin note'),
@ -323,7 +311,6 @@ class Edit extends Profile
// личное // личное
$fields = []; $fields = [];
$fields['realname'] = [ $fields['realname'] = [
'id' => 'realname',
'type' => 'text', 'type' => 'text',
'maxlength' => 40, 'maxlength' => 40,
'caption' => \ForkBB\__('Realname'), 'caption' => \ForkBB\__('Realname'),
@ -335,7 +322,6 @@ class Edit extends Profile
2 => \ForkBB\__('Female'), 2 => \ForkBB\__('Female'),
]; ];
$fields['gender'] = [ $fields['gender'] = [
'id' => 'gender',
'class' => 'block', 'class' => 'block',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->gender, 'value' => $this->curUser->gender,
@ -343,14 +329,12 @@ class Edit extends Profile
'caption' => \ForkBB\__('Gender'), 'caption' => \ForkBB\__('Gender'),
]; ];
$fields['location'] = [ $fields['location'] = [
'id' => 'location',
'type' => 'text', 'type' => 'text',
'maxlength' => 30, 'maxlength' => 30,
'caption' => \ForkBB\__('Location'), 'caption' => \ForkBB\__('Location'),
'value' => $this->curUser->location, 'value' => $this->curUser->location,
]; ];
$form['sets'][] = [ $form['sets']['personal'] = [
'id' => 'personal',
'class' => 'data-edit', 'class' => 'data-edit',
'legend' => \ForkBB\__('Personal information'), 'legend' => \ForkBB\__('Personal information'),
'fields' => $fields, 'fields' => $fields,
@ -360,7 +344,6 @@ class Edit extends Profile
$fields = []; $fields = [];
if ($this->rules->viewOEmail) { if ($this->rules->viewOEmail) {
$fields['open-email'] = [ $fields['open-email'] = [
'id' => 'open-email',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Email info'), 'caption' => \ForkBB\__('Email info'),
@ -368,15 +351,13 @@ class Edit extends Profile
]; ];
} }
if ($this->rules->editEmail) { if ($this->rules->editEmail) {
$fields[] = [ $fields['change_email'] = [
'id' => 'change_email',
'type' => 'link', 'type' => 'link',
'value' => \ForkBB\__('To change email'), 'value' => \ForkBB\__('To change email'),
'href' => $this->c->Router->link('EditUserEmail', ['id' => $this->curUser->id]), 'href' => $this->c->Router->link('EditUserEmail', ['id' => $this->curUser->id]),
]; ];
} }
$fields['email_setting'] = [ $fields['email_setting'] = [
'id' => 'email_setting',
'class' => 'block', 'class' => 'block',
'type' => 'radio', 'type' => 'radio',
'value' => $this->curUser->email_setting, 'value' => $this->curUser->email_setting,
@ -406,8 +387,7 @@ class Edit extends Profile
'href' => \ForkBB\cens($this->curUser->url), 'href' => \ForkBB\cens($this->curUser->url),
]; ];
} }
$form['sets'][] = [ $form['sets']['contacts'] = [
'id' => 'contacts',
'class' => 'data-edit', 'class' => 'data-edit',
'legend' => \ForkBB\__('Contact details'), 'legend' => \ForkBB\__('Contact details'),
'fields' => $fields, 'fields' => $fields,
@ -417,14 +397,12 @@ class Edit extends Profile
if ($this->rules->useSignature) { if ($this->rules->useSignature) {
$fields = []; $fields = [];
$fields['signature'] = [ $fields['signature'] = [
'id' => 'signature',
'type' => 'textarea', 'type' => 'textarea',
'value' => $this->curUser->signature, 'value' => $this->curUser->signature,
'caption' => \ForkBB\__('Signature'), 'caption' => \ForkBB\__('Signature'),
'info' => \ForkBB\__('Sig max size', \ForkBB\num($this->c->config->p_sig_length), \ForkBB\num($this->c->config->p_sig_lines)), 'info' => \ForkBB\__('Sig max size', \ForkBB\num($this->c->config->p_sig_length), \ForkBB\num($this->c->config->p_sig_lines)),
]; ];
$form['sets'][] = [ $form['sets']['signature'] = [
'id' => 'signature',
'class' => 'data-edit', 'class' => 'data-edit',
'legend' => \ForkBB\__('Signature'), 'legend' => \ForkBB\__('Signature'),
'fields' => $fields, 'fields' => $fields,

View file

@ -147,11 +147,10 @@ class Email extends Profile
'token' => $this->c->Csrf->create('EditUserEmail', ['id' => $this->curUser->id]), 'token' => $this->c->Csrf->create('EditUserEmail', ['id' => $this->curUser->id]),
], ],
'sets' => [ 'sets' => [
[ 'new-email' => [
'class' => 'data-edit', 'class' => 'data-edit',
'fields' => [ 'fields' => [
'new_email' => [ 'new_email' => [
'id' => 'new_email',
'type' => 'text', 'type' => 'text',
'maxlength' => 80, 'maxlength' => 80,
'caption' => \ForkBB\__('New email'), 'caption' => \ForkBB\__('New email'),
@ -161,7 +160,6 @@ class Email extends Profile
'info' => ! $this->user->isAdmin && '1' == $this->c->config->o_regs_verify ? \ForkBB\__('Email instructions') : null, 'info' => ! $this->user->isAdmin && '1' == $this->c->config->o_regs_verify ? \ForkBB\__('Email instructions') : null,
], ],
'password' => [ 'password' => [
'id' => 'password',
'type' => 'password', 'type' => 'password',
'caption' => \ForkBB\__('Your passphrase'), 'caption' => \ForkBB\__('Your passphrase'),
'required' => true, 'required' => true,

View file

@ -84,11 +84,10 @@ class Pass extends Profile
'token' => $this->c->Csrf->create('EditUserPass', ['id' => $this->curUser->id]), 'token' => $this->c->Csrf->create('EditUserPass', ['id' => $this->curUser->id]),
], ],
'sets' => [ 'sets' => [
[ 'new-pass' => [
'class' => 'data-edit', 'class' => 'data-edit',
'fields' => [ 'fields' => [
'new_pass' => [ 'new_pass' => [
'id' => 'new_pass',
'type' => 'password', 'type' => 'password',
'maxlength' => 25, 'maxlength' => 25,
'caption' => \ForkBB\__('New pass'), 'caption' => \ForkBB\__('New pass'),
@ -97,7 +96,6 @@ class Pass extends Profile
'info' => \ForkBB\__('Pass format') . ' ' . \ForkBB\__('Pass info'), 'info' => \ForkBB\__('Pass format') . ' ' . \ForkBB\__('Pass info'),
], ],
'password' => [ 'password' => [
'id' => 'password',
'type' => 'password', 'type' => 'password',
'caption' => \ForkBB\__('Your passphrase'), 'caption' => \ForkBB\__('Your passphrase'),
'required' => true, 'required' => true,

View file

@ -47,14 +47,12 @@ class View extends Profile
'type' => 'wrap', 'type' => 'wrap',
]; ];
$fields['username'] = [ $fields['username'] = [
'id' => 'username',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Username'), 'caption' => \ForkBB\__('Username'),
'value' => $this->curUser->username, 'value' => $this->curUser->username,
]; ];
$fields['title'] = [ $fields['title'] = [
'id' => 'title',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Title'), 'caption' => \ForkBB\__('Title'),
@ -65,14 +63,12 @@ class View extends Profile
]; ];
if ($this->rules->useAvatar) { if ($this->rules->useAvatar) {
$fields['avatar'] = [ $fields['avatar'] = [
'id' => 'avatar',
'type' => 'yield', 'type' => 'yield',
'caption' => \ForkBB\__('Avatar'), 'caption' => \ForkBB\__('Avatar'),
'value' => 'avatar', 'value' => 'avatar',
]; ];
} }
$form['sets'][] = [ $form['sets']['header'] = [
'id' => 'header',
'class' => 'header', 'class' => 'header',
# 'legend' => \ForkBB\__('Options'), # 'legend' => \ForkBB\__('Options'),
'fields' => $fields, 'fields' => $fields,
@ -80,13 +76,11 @@ class View extends Profile
// примечание администрации // примечание администрации
if ($this->user->isAdmMod && '' != $this->curUser->admin_note) { if ($this->user->isAdmMod && '' != $this->curUser->admin_note) {
$form['sets'][] = [ $form['sets']['note'] = [
'id' => 'note',
'class' => 'data', 'class' => 'data',
'legend' => \ForkBB\__('Admin note'), 'legend' => \ForkBB\__('Admin note'),
'fields' => [ 'fields' => [
'admin_note' => [ 'admin_note' => [
'id' => 'admin_note',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Admin note'), 'caption' => \ForkBB\__('Admin note'),
@ -100,7 +94,6 @@ class View extends Profile
$fields = []; $fields = [];
if ('' != $this->curUser->realname) { if ('' != $this->curUser->realname) {
$fields['realname'] = [ $fields['realname'] = [
'id' => 'realname',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Realname'), 'caption' => \ForkBB\__('Realname'),
@ -114,7 +107,6 @@ class View extends Profile
]; ];
if ($this->curUser->gender && isset($genders[$this->curUser->gender])) { if ($this->curUser->gender && isset($genders[$this->curUser->gender])) {
$fields['gender'] = [ $fields['gender'] = [
'id' => 'gender',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'value' => $genders[$this->curUser->gender], 'value' => $genders[$this->curUser->gender],
@ -123,7 +115,6 @@ class View extends Profile
} }
if ('' != $this->curUser->location) { if ('' != $this->curUser->location) {
$fields['location'] = [ $fields['location'] = [
'id' => 'location',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Location'), 'caption' => \ForkBB\__('Location'),
@ -131,8 +122,7 @@ class View extends Profile
]; ];
} }
if (! empty($fields)) { if (! empty($fields)) {
$form['sets'][] = [ $form['sets']['personal'] = [
'id' => 'personal',
'class' => 'data', 'class' => 'data',
'legend' => \ForkBB\__('Personal information'), 'legend' => \ForkBB\__('Personal information'),
'fields' => $fields, 'fields' => $fields,
@ -143,7 +133,6 @@ class View extends Profile
$fields = []; $fields = [];
if ($this->rules->viewOEmail) { if ($this->rules->viewOEmail) {
$fields['open-email'] = [ $fields['open-email'] = [
'id' => 'open-email',
'class' => 'pline', 'class' => 'pline',
'type' => 2 === $this->curUser->email_setting ? 'str' : 'link', 'type' => 2 === $this->curUser->email_setting ? 'str' : 'link',
'caption' => \ForkBB\__('Email info'), 'caption' => \ForkBB\__('Email info'),
@ -154,7 +143,6 @@ class View extends Profile
if ($this->rules->viewEmail) { if ($this->rules->viewEmail) {
if (0 === $this->curUser->email_setting) { if (0 === $this->curUser->email_setting) {
$fields['email'] = [ $fields['email'] = [
'id' => 'email',
'class' => 'pline', 'class' => 'pline',
'type' => 'link', 'type' => 'link',
'caption' => \ForkBB\__('Email info'), 'caption' => \ForkBB\__('Email info'),
@ -163,7 +151,6 @@ class View extends Profile
]; ];
} elseif (1 === $this->curUser->email_setting) { } elseif (1 === $this->curUser->email_setting) {
$fields['email'] = [ $fields['email'] = [
'id' => 'email',
'class' => 'pline', 'class' => 'pline',
'type' => 'link', 'type' => 'link',
'caption' => \ForkBB\__('Email info'), 'caption' => \ForkBB\__('Email info'),
@ -183,8 +170,7 @@ class View extends Profile
]; ];
} }
if (! empty($fields)) { if (! empty($fields)) {
$form['sets'][] = [ $form['sets']['contacts'] = [
'id' => 'contacts',
'class' => 'data', 'class' => 'data',
'legend' => \ForkBB\__('Contact details'), 'legend' => \ForkBB\__('Contact details'),
'fields' => $fields, 'fields' => $fields,
@ -196,15 +182,13 @@ class View extends Profile
$fields = []; $fields = [];
if ('' != $this->curUser->signature) { if ('' != $this->curUser->signature) {
$fields['signature'] = [ $fields['signature'] = [
'id' => 'signature',
'type' => 'yield', 'type' => 'yield',
'caption' => \ForkBB\__('Signature'), 'caption' => \ForkBB\__('Signature'),
'value' => 'signature', 'value' => 'signature',
]; ];
} }
if (! empty($fields)) { if (! empty($fields)) {
$form['sets'][] = [ $form['sets']['signature'] = [
'id' => 'signature',
'class' => 'data', 'class' => 'data',
'legend' => \ForkBB\__('Signature'), 'legend' => \ForkBB\__('Signature'),
'fields' => $fields, 'fields' => $fields,
@ -215,7 +199,6 @@ class View extends Profile
// активность // активность
$fields = []; $fields = [];
$fields['registered'] = [ $fields['registered'] = [
'id' => 'registered',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'value' => \ForkBB\dt($this->curUser->registered, true), 'value' => \ForkBB\dt($this->curUser->registered, true),
@ -223,7 +206,6 @@ class View extends Profile
]; ];
if ($this->rules->viewLastVisit) { if ($this->rules->viewLastVisit) {
$fields['lastvisit'] = [ $fields['lastvisit'] = [
'id' => 'lastvisit',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'value' => \ForkBB\dt($this->curUser->last_visit, true), 'value' => \ForkBB\dt($this->curUser->last_visit, true),
@ -231,7 +213,6 @@ class View extends Profile
]; ];
} }
$fields['lastpost'] = [ $fields['lastpost'] = [
'id' => 'lastpost',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'value' => \ForkBB\dt($this->curUser->last_post, true), 'value' => \ForkBB\dt($this->curUser->last_post, true),
@ -240,7 +221,6 @@ class View extends Profile
if ($this->curUser->num_posts) { if ($this->curUser->num_posts) {
if ('1' == $this->user->g_search) { if ('1' == $this->user->g_search) {
$fields['posts'] = [ $fields['posts'] = [
'id' => 'posts',
'class' => 'pline', 'class' => 'pline',
'type' => 'link', 'type' => 'link',
'caption' => \ForkBB\__('Posts info'), 'caption' => \ForkBB\__('Posts info'),
@ -249,7 +229,6 @@ class View extends Profile
'title' => \ForkBB\__('Show posts'), 'title' => \ForkBB\__('Show posts'),
]; ];
$fields['topics'] = [ $fields['topics'] = [
'id' => 'topics',
'class' => 'pline', 'class' => 'pline',
'type' => 'link', 'type' => 'link',
'caption' => \ForkBB\__('Topics info'), 'caption' => \ForkBB\__('Topics info'),
@ -259,14 +238,12 @@ class View extends Profile
]; ];
} elseif ($this->user->showPostCount) { } elseif ($this->user->showPostCount) {
$fields['posts'] = [ $fields['posts'] = [
'id' => 'posts',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Posts info'), 'caption' => \ForkBB\__('Posts info'),
'value' => \ForkBB\num($this->curUser->num_posts), 'value' => \ForkBB\num($this->curUser->num_posts),
]; ];
$fields['topics'] = [ $fields['topics'] = [
'id' => 'topics',
'class' => 'pline', 'class' => 'pline',
'type' => 'str', 'type' => 'str',
'caption' => \ForkBB\__('Topics info'), 'caption' => \ForkBB\__('Topics info'),
@ -276,7 +253,6 @@ class View extends Profile
} }
if ($this->rules->viewIP) { if ($this->rules->viewIP) {
$fields['ip'] = [ $fields['ip'] = [
'id' => 'ip',
'class' => 'pline', 'class' => 'pline',
'type' => 'link', 'type' => 'link',
'caption' => \ForkBB\__('IP'), 'caption' => \ForkBB\__('IP'),
@ -285,8 +261,7 @@ class View extends Profile
'title' => \ForkBB\__('IP title'), 'title' => \ForkBB\__('IP title'),
]; ];
} }
$form['sets'][] = [ $form['sets']['activity'] = [
'id' => 'activity',
'class' => 'data', 'class' => 'data',
'legend' => \ForkBB\__('User activity'), 'legend' => \ForkBB\__('User activity'),
'fields' => $fields, 'fields' => $fields,

View file

@ -143,7 +143,7 @@ class Search extends Page
]; ];
if ($advanced) { if ($advanced) {
$form['sets'][] = [ $form['sets']['what'] = [
'fields' => [ 'fields' => [
[ [
'type' => 'info', 'type' => 'info',
@ -173,7 +173,7 @@ class Search extends Page
], ],
], ],
]; ];
$form['sets'][] = [ $form['sets']['where'] = [
'legend' => \ForkBB\__('Search in legend'), 'legend' => \ForkBB\__('Search in legend'),
'fields' => [ 'fields' => [
'forums' => [ 'forums' => [
@ -206,7 +206,7 @@ class Search extends Page
], ],
]; ];
$form['sets'][] = [ $form['sets']['how'] = [
'legend' => \ForkBB\__('Search results legend'), 'legend' => \ForkBB\__('Search results legend'),
'fields' => [ 'fields' => [
'sort_by' => [ 'sort_by' => [
@ -249,7 +249,7 @@ class Search extends Page
]; ];
} else { } else {
$form['sets'][] = [ $form['sets']['what'] = [
'fields' => [ 'fields' => [
[ [
'type' => 'info', 'type' => 'info',

View file

@ -172,7 +172,7 @@ class Userlist extends Page
], ],
'caption' => \ForkBB\__('User sort order'), 'caption' => \ForkBB\__('User sort order'),
]; ];
$form['sets'][] = ['fields' => $fields]; $form['sets']['users'] = ['fields' => $fields];
$this->fIndex = 'userlist'; $this->fIndex = 'userlist';
$this->nameTpl = 'userlist'; $this->nameTpl = 'userlist';

View file

@ -6,26 +6,26 @@
@endforeach @endforeach
@endif @endif
@endif @endif
@foreach ($form['sets'] as $set) @foreach ($form['sets'] as $setKey => $setVal)
@if ($set['info']) @if ($setVal['info'])
@foreach ($set['info'] as $key => $cur) @foreach ($setVal['info'] as $key => $cur)
<p class="f-finfo"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p> <p class="f-finfo"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
@endforeach @endforeach
@elseif ($set['fields']) @elseif ($setVal['fields'])
<fieldset @if ($set['id']) id="id-fs-{{ $set['id'] }}" @endif @if ($set['class']) class="f-fs-{!! implode(' f-fs-', (array) $set['class']) !!}" @endif> <fieldset id="id-fs-{{ $setKey }}" @if ($setVal['class']) class="f-fs-{!! implode(' f-fs-', (array) $setVal['class']) !!}" @endif>
@if ($set['legend']) @if ($setVal['legend'])
<legend>{!! $set['legend'] !!}</legend> <legend>{!! $setVal['legend'] !!}</legend>
@endif @endif
@foreach ($set['fields'] as $key => $cur) @foreach ($setVal['fields'] as $key => $cur)
@if ('info' === $cur['type']) @if ('info' === $cur['type'])
<p class="f-child6"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p> <p id="id-{{ $cur['id'] or $key }}" class="f-child6"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
@elseif ('wrap' === $cur['type']) @elseif ('wrap' === $cur['type'])
<div @if ($cur['id']) id="id-{{ $cur['id'] }}" @endif @if ($cur['class']) class="f-wrap-{!! implode(' f-wrap-', (array) $cur['class']) !!}" @endif> <div id="id-{{ $cur['id'] or $key }}" @if ($cur['class']) class="f-wrap-{!! implode(' f-wrap-', (array) $cur['class']) !!}" @endif>
@elseif ('endwrap' === $cur['type']) @elseif ('endwrap' === $cur['type'])
</div> </div>
@else @else
<dl @if ($cur['id']) id="id-dl-{{ $cur['id'] }}" @endif @if ($cur['class']) class="f-field-{!! implode(' f-field-', (array) $cur['class']) !!}" @endif> <dl id="id-dl-{{ $cur['id'] or $key }}" @if ($cur['class']) class="f-field-{!! implode(' f-field-', (array) $cur['class']) !!}" @endif>
<dt> @if ($cur['caption'])<label class="f-child1 @if ($cur['required']) f-req @endif" @if (is_string($key) && 'radio' !== $cur['type'] && 'yield' !== $cur['type']) for="id-{{ $key }}" @endif>{!! $cur['caption'] !!}</label> @endif</dt> <dt> @if ($cur['caption'])<label class="f-child1 @if ($cur['required']) f-req @endif" @if (false === \strpos('.radio.yield.str.btn.', ".{$cur['type']}.")) for="id-{{ $key }}" @endif>{!! $cur['caption'] !!}</label> @endif</dt>
<dd> <dd>
@if ('text' === $cur['type']) @if ('text' === $cur['type'])
<input @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="text" @if ($cur['maxlength']) maxlength="{{ $cur['maxlength'] }}" @endif @if ($cur['pattern']) pattern="{{ $cur['pattern'] }}" @endif @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif> <input @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="text" @if ($cur['maxlength']) maxlength="{{ $cur['maxlength'] }}" @endif @if ($cur['pattern']) pattern="{{ $cur['pattern'] }}" @endif @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif>
@ -40,10 +40,10 @@
@endif @endif
@elseif ('select' === $cur['type']) @elseif ('select' === $cur['type'])
<select @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}"> <select @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}">
@if (null === ($count = null) && is_array(reset($cur['options'])) && 1 === count(reset($cur['options'])) && $count = 0) @endif @if (null === ($count = null) && \is_array(reset($cur['options'])) && 1 === \count(reset($cur['options'])) && $count = 0) @endif
@foreach ($cur['options'] as $v => $option) @foreach ($cur['options'] as $v => $option)
@if (is_array($option)) @if (\is_array($option))
@if (null !== $count && 1 === count($option)) @if (null !== $count && 1 === \count($option))
@if (++$count > 1) @if (++$count > 1)
</optgroup> </optgroup>
@endif @endif
@ -61,19 +61,19 @@
</select> </select>
@elseif ('multiselect' === $cur['type']) @elseif ('multiselect' === $cur['type'])
<select @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif @if ($cur['size']) size="{{ $cur['size'] }}" @endif multiple class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}[]"> <select @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif @if ($cur['size']) size="{{ $cur['size'] }}" @endif multiple class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}[]">
@if (null === ($count = null) && is_array(reset($cur['options'])) && 1 === count(reset($cur['options'])) && $count = 0) @endif @if (null === ($count = null) && \is_array(reset($cur['options'])) && 1 === count(reset($cur['options'])) && $count = 0) @endif
@foreach ($cur['options'] as $v => $option) @foreach ($cur['options'] as $v => $option)
@if (is_array($option)) @if (\is_array($option))
@if (null !== $count && 1 === count($option)) @if (null !== $count && 1 === count($option))
@if (++$count > 1) @if (++$count > 1)
</optgroup> </optgroup>
@endif @endif
<optgroup label="{{ $option[0] }}"> <optgroup label="{{ $option[0] }}">
@else @else
<option value="{{ $option[0] }}" @if ((is_array($cur['value']) && in_array($option[0], $cur['value'])) || $option[0] == $cur['value']) selected @endif @if ($option[2]) disabled @endif>{{ $option[1] }}</option> <option value="{{ $option[0] }}" @if ((\is_array($cur['value']) && in_array($option[0], $cur['value'])) || $option[0] == $cur['value']) selected @endif @if ($option[2]) disabled @endif>{{ $option[1] }}</option>
@endif @endif
@else @else
<option value="{{ $v }}" @if ((is_array($cur['value']) && in_array($v, $cur['value'])) || $v == $cur['value']) selected @endif>{{ $option }}</option> <option value="{{ $v }}" @if ((\is_array($cur['value']) && in_array($v, $cur['value'])) || $v == $cur['value']) selected @endif>{{ $option }}</option>
@endif @endif
@endforeach @endforeach
@if (null !== $count) @if (null !== $count)