Update form.forkbb.php template
This commit is contained in:
parent
7f48a585c1
commit
b7a88db120
30 changed files with 125 additions and 121 deletions
|
@ -504,7 +504,7 @@ class Bans extends Admin
|
|||
'value' => '✎',
|
||||
'caption' => 'Results actions head',
|
||||
'title' => __('Edit'),
|
||||
'link' => $this->c->Router->link(
|
||||
'href' => $this->c->Router->link(
|
||||
'AdminBansEdit',
|
||||
$arr
|
||||
),
|
||||
|
@ -515,7 +515,7 @@ class Bans extends Admin
|
|||
'value' => '❌',
|
||||
'caption' => 'Results actions head',
|
||||
'title' => __('Delete'),
|
||||
'link' => $this->c->Router->link(
|
||||
'href' => $this->c->Router->link(
|
||||
'AdminBansDelete',
|
||||
[
|
||||
'id' => $ban['id'],
|
||||
|
|
|
@ -109,7 +109,7 @@ class Categories extends Admin
|
|||
'value' => '❌',
|
||||
'caption' => 'Delete',
|
||||
'title' => __('Delete'),
|
||||
'link' => $this->c->Router->link(
|
||||
'href' => $this->c->Router->link(
|
||||
'AdminCategoriesDelete',
|
||||
[
|
||||
'id' => $key,
|
||||
|
@ -226,7 +226,7 @@ class Categories extends Admin
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('AdminCategories'),
|
||||
'href' => $this->c->Router->link('AdminCategories'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -147,7 +147,7 @@ class Forums extends Admin
|
|||
'new' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('New forum'),
|
||||
'link' => $this->c->Router->link('AdminForumsNew'),
|
||||
'href' => $this->c->Router->link('AdminForumsNew'),
|
||||
],
|
||||
'update' => [
|
||||
'type' => 'submit',
|
||||
|
@ -180,7 +180,7 @@ class Forums extends Admin
|
|||
'type' => 'btn',
|
||||
'value' => $forum->forum_name,
|
||||
'caption' => 'Forum label',
|
||||
'link' => $this->c->Router->link(
|
||||
'href' => $this->c->Router->link(
|
||||
'AdminForumsEdit',
|
||||
[
|
||||
'id' => $forum->id,
|
||||
|
@ -202,7 +202,7 @@ class Forums extends Admin
|
|||
'value' => '❌',
|
||||
'caption' => 'Delete',
|
||||
'title' => __('Delete'),
|
||||
'link' => $disabled
|
||||
'href' => $disabled
|
||||
? '#'
|
||||
: $this->c->Router->link(
|
||||
'AdminForumsDelete',
|
||||
|
@ -321,7 +321,7 @@ class Forums extends Admin
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('AdminForums'),
|
||||
'href' => $this->c->Router->link('AdminForums'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -843,7 +843,7 @@ class Groups extends Admin
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('AdminGroups'),
|
||||
'href' => $this->c->Router->link('AdminGroups'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -205,7 +205,7 @@ class Install extends Admin
|
|||
'cookie_path' => 'Cookie Path',
|
||||
'cookie_secure' => 'Cookie Secure',
|
||||
])->addMessages([
|
||||
'email' => 'Wrong email',
|
||||
'email' => 'Wrong email',
|
||||
]);
|
||||
|
||||
if ($v->validation($_POST)) {
|
||||
|
@ -334,13 +334,14 @@ class Install extends Admin
|
|||
'required' => true,
|
||||
],
|
||||
'email' => [
|
||||
'type' => 'email',
|
||||
'maxlength' => '80',
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $v->email ?? '',
|
||||
'caption' => 'Administrator email',
|
||||
'help' => 'Info 10',
|
||||
'required' => true,
|
||||
'type' => 'text',
|
||||
'maxlength' => '80',
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $v->email ?? '',
|
||||
'caption' => 'Administrator email',
|
||||
'help' => 'Info 10',
|
||||
'required' => true,
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
|
||||
],
|
||||
|
|
|
@ -162,7 +162,7 @@ class Logs extends Admin
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('AdminLogs'),
|
||||
'href' => $this->c->Router->link('AdminLogs'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -512,22 +512,24 @@ class Options extends Admin
|
|||
'legend' => 'E-mail subhead',
|
||||
'fields' => [
|
||||
'o_admin_email' => [
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $config->o_admin_email,
|
||||
'caption' => 'Admin e-mail label',
|
||||
'help' => 'Admin e-mail help',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $config->o_admin_email,
|
||||
'caption' => 'Admin e-mail label',
|
||||
'help' => 'Admin e-mail help',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
'o_webmaster_email' => [
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $config->o_webmaster_email,
|
||||
'caption' => 'Webmaster e-mail label',
|
||||
'help' => 'Webmaster e-mail help',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $config->o_webmaster_email,
|
||||
'caption' => 'Webmaster e-mail label',
|
||||
'help' => 'Webmaster e-mail help',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
'b_forum_subscriptions' => [
|
||||
'type' => 'radio',
|
||||
|
|
|
@ -138,7 +138,7 @@ class BBCode extends Parser
|
|||
'new' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('New BBCode'),
|
||||
'link' => $this->c->Router->link('AdminBBCodeNew'),
|
||||
'href' => $this->c->Router->link('AdminBBCodeNew'),
|
||||
],
|
||||
'save' => [
|
||||
'type' => 'submit',
|
||||
|
@ -189,7 +189,7 @@ class BBCode extends Parser
|
|||
'value' => '❌',
|
||||
'caption' => 'Delete',
|
||||
'title' => __('Delete'),
|
||||
'link' => 1 === $tagData['bb_delete']
|
||||
'href' => 1 === $tagData['bb_delete']
|
||||
? $this->c->Router->link('AdminBBCodeDelete', ['id' => $id])
|
||||
: null,
|
||||
'disabled' => 1 !== $tagData['bb_delete'],
|
||||
|
@ -312,7 +312,7 @@ class BBCode extends Parser
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->AdminBBCodeUrl,
|
||||
'href' => $this->AdminBBCodeUrl,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -500,7 +500,7 @@ class BBCode extends Parser
|
|||
'class' => ['f-opacity'],
|
||||
'type' => 'btn',
|
||||
'value' => __('Default structure'),
|
||||
'link' => $this->c->Router->link(
|
||||
'href' => $this->c->Router->link(
|
||||
'AdminBBCodeDefault',
|
||||
[
|
||||
'id' => $id,
|
||||
|
@ -554,8 +554,9 @@ class BBCode extends Parser
|
|||
'value' => $structure->parents,
|
||||
'caption' => 'Parents label',
|
||||
'help' => 'Parents info',
|
||||
'size' => \min(15, \count($this->bbTypes)), // multiple
|
||||
'size' => \min(15, \count($this->bbTypes)),
|
||||
'required' => true,
|
||||
'multiple' => true,
|
||||
],
|
||||
'handler' => [
|
||||
'class' => ['handler'],
|
||||
|
|
|
@ -116,7 +116,7 @@ class Edit extends Parser
|
|||
'caption' => null,
|
||||
'value' => __('BBCode management'),
|
||||
'title' => __('BBCode management'),
|
||||
'link' => $this->c->Router->link('AdminBBCode'),
|
||||
'href' => $this->c->Router->link('AdminBBCode'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -143,7 +143,7 @@ class Edit extends Parser
|
|||
'caption' => null,
|
||||
'value' => __('Smilies management'),
|
||||
'title' => __('Smilies management'),
|
||||
'link' => $this->c->Router->link('AdminSmilies'),
|
||||
'href' => $this->c->Router->link('AdminSmilies'),
|
||||
],
|
||||
|
||||
],
|
||||
|
|
|
@ -198,7 +198,7 @@ class Smilies extends Parser
|
|||
'value' => '❌',
|
||||
'caption' => 'Delete',
|
||||
'title' => __('Delete'),
|
||||
'link' => $this->c->Router->link(
|
||||
'href' => $this->c->Router->link(
|
||||
'AdminSmiliesDelete',
|
||||
[
|
||||
'name' => $id,
|
||||
|
|
|
@ -99,7 +99,7 @@ class Providers extends Admin
|
|||
'type' => 'btn',
|
||||
'value' => __($provider->name),
|
||||
'caption' => 'Provider label',
|
||||
'link' => $this->c->Router->link('AdminProvider', ['name' => $provider->name]),
|
||||
'href' => $this->c->Router->link('AdminProvider', ['name' => $provider->name]),
|
||||
];
|
||||
$fields["form[{$provider->name}][pr_pos]"] = [
|
||||
'class' => ['position', 'provider'],
|
||||
|
|
|
@ -124,7 +124,7 @@ class Reports extends Admin
|
|||
'type' => 'btn',
|
||||
'value' => __('Zap'),
|
||||
'title' => __('Zap'),
|
||||
'link' => $report->linkZap,
|
||||
'href' => $report->linkZap,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ class Action extends Users
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('AdminUsers'),
|
||||
'href' => $this->c->Router->link('AdminUsers'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -364,7 +364,7 @@ class Action extends Users
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $linkCancel,
|
||||
'href' => $linkCancel,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -104,13 +104,14 @@ class NewUser extends Users
|
|||
'pattern' => '^.{2,25}$',
|
||||
],
|
||||
'email' => [
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $data['email'] ?? null,
|
||||
'caption' => 'Email',
|
||||
'help' => 'Email info',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $data['email'] ?? null,
|
||||
'caption' => 'Email',
|
||||
'help' => 'Email info',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
'password' => [
|
||||
'type' => 'text',
|
||||
|
|
|
@ -149,7 +149,7 @@ class View extends Users
|
|||
'new' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Add'),
|
||||
'link' => $this->c->Router->link('AdminUsersNew'),
|
||||
'href' => $this->c->Router->link('AdminUsersNew'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -367,14 +367,15 @@ class Auth extends Page
|
|||
'forget' => [
|
||||
'fields' => [
|
||||
'email' => [
|
||||
'autofocus' => true,
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $email,
|
||||
'caption' => 'Email',
|
||||
'help' => 'Passphrase reset info',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autofocus' => true,
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $email,
|
||||
'caption' => 'Email',
|
||||
'help' => 'Passphrase reset info',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -132,7 +132,7 @@ class Delete extends Page
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('ViewPost', $args),
|
||||
'href' => $this->c->Router->link('ViewPost', $args),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -176,7 +176,7 @@ class Email extends Page
|
|||
'back' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Go back'),
|
||||
'link' => $data['redirect'],
|
||||
'href' => $data['redirect'],
|
||||
'class' => ['f-opacity', 'f-go-back'],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -186,7 +186,7 @@ class PMBlock extends AbstractPM
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->linkBack,
|
||||
'href' => $this->linkBack,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -165,7 +165,7 @@ class PMDelete extends AbstractPM
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $post->link,
|
||||
'href' => $post->link,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -175,7 +175,7 @@ class PMTopic extends AbstractPM
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->model->link,
|
||||
'href' => $this->model->link,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -199,7 +199,7 @@ class PMView extends AbstractPM
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('PMAction', $args),
|
||||
'href' => $this->c->Router->link('PMAction', $args),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -59,13 +59,14 @@ trait PostFormTrait
|
|||
'autofocus' => $autofocus,
|
||||
];
|
||||
$fieldset['email'] = [
|
||||
'class' => ['w2'],
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'caption' => 'Email',
|
||||
'required' => 1 === $this->c->config->b_force_guest_email,
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $vars['email'] ?? null,
|
||||
'class' => ['w2'],
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'caption' => 'Email',
|
||||
'required' => 1 === $this->c->config->b_force_guest_email,
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $vars['email'] ?? null,
|
||||
'autocapitalize' => 'off',
|
||||
];
|
||||
$autofocus = null;
|
||||
}
|
||||
|
|
|
@ -226,14 +226,15 @@ class Email extends Profile
|
|||
'class' => ['data-edit'],
|
||||
'fields' => [
|
||||
'new_email' => [
|
||||
'autofocus' => true,
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'caption' => $this->rules->confirmEmail ? 'New or old email' : 'New email',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $this->curUser->email,
|
||||
'help' => $this->rules->my ? 'Email instructions' : null,
|
||||
'autofocus' => true,
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'caption' => $this->rules->confirmEmail ? 'New or old email' : 'New email',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $this->curUser->email,
|
||||
'help' => $this->rules->my ? 'Email instructions' : null,
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
'password' => [
|
||||
'type' => 'password',
|
||||
|
|
|
@ -77,7 +77,7 @@ class OAuth extends Profile
|
|||
'class' => ['oauth-acc-btn'],
|
||||
'value' => $value,
|
||||
'title' => $title,
|
||||
'link' => $this->c->Router->link('EditUserOAuthAction', $args),
|
||||
'href' => $this->c->Router->link('EditUserOAuthAction', $args),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ class OAuth extends Profile
|
|||
'cancel' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Cancel'),
|
||||
'link' => $this->c->Router->link('EditUserOAuth', $args),
|
||||
'href' => $this->c->Router->link('EditUserOAuth', $args),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -119,15 +119,16 @@ class Register extends Page
|
|||
'reg' => [
|
||||
'fields' => [
|
||||
'email' => [
|
||||
'autofocus' => true,
|
||||
'class' => ['hint'],
|
||||
'type' => 'email',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $v->email,
|
||||
'caption' => 'Email',
|
||||
'help' => 'Email info',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autofocus' => true,
|
||||
'class' => ['hint'],
|
||||
'type' => 'text',
|
||||
'maxlength' => (string) $this->c->MAX_EMAIL_LENGTH,
|
||||
'value' => $v->email,
|
||||
'caption' => 'Email',
|
||||
'help' => 'Email info',
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
'username' => [
|
||||
'class' => ['hint'],
|
||||
|
|
|
@ -149,7 +149,7 @@ class Report extends Page
|
|||
'back' => [
|
||||
'type' => 'btn',
|
||||
'value' => __('Go back'),
|
||||
'link' => $this->c->Router->link('ViewPost', ['id' => $args['id']]),
|
||||
'href' => $this->c->Router->link('ViewPost', ['id' => $args['id']]),
|
||||
'class' => ['f-opacity', 'f-go-back'],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -233,12 +233,13 @@ class Search extends Page
|
|||
'legend' => 'Search in legend',
|
||||
'fields' => [
|
||||
'forums' => [
|
||||
'class' => ['w3'],
|
||||
'type' => 'select',
|
||||
'options' => $this->listForOptions,
|
||||
'value' => isset($v->forums) ? \explode('.', $v->forums) : null,
|
||||
'caption' => 'Forum search',
|
||||
'size' => \min(\count($this->listForOptions), 10), // multiple
|
||||
'class' => ['w3'],
|
||||
'type' => 'select',
|
||||
'options' => $this->listForOptions,
|
||||
'value' => isset($v->forums) ? \explode('.', $v->forums) : null,
|
||||
'caption' => 'Forum search',
|
||||
'size' => \min(\count($this->listForOptions), 10),
|
||||
'multiple' => true,
|
||||
],
|
||||
'serch_in' => [
|
||||
'class' => ['w3'],
|
||||
|
|
|
@ -33,13 +33,16 @@
|
|||
@switch ($cur['type'])
|
||||
@case ('text')
|
||||
@case ('email')
|
||||
<input @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif @if ('email' === $cur['type']) autocapitalize="off" @endif class="f-ctrl f-ytxt" id="id-{{ $key }}" name="{{ $key }}" type="text" @if ($cur['maxlength']) maxlength="{{ $cur['maxlength'] }}" @endif @if ($cur['pattern']) pattern="{{ $cur['pattern'] }}" @endif @isset ($cur['value']) value="{{ $cur['value'] }}" @endisset>
|
||||
@case ('number')
|
||||
@case ('password')
|
||||
@case ('file')
|
||||
<input id="id-{{ $key }}" name="{{ $key }}" class="f-ctrl" type="{{ $cur['type'] }}" @foreach ($cur as $k => $v) @if (\in_array($k, ['autofocus', 'disabled', 'readonly', 'required'], true) && ! empty($v)) {!! $k !!} @elseif (\in_array($k, ['accept', 'autocapitalize', 'autocomplete', 'max', 'maxlength', 'min', 'pattern', 'placeholder', 'step', 'title', 'value'], true)) {!! $k !!}="{{ $v }}" @endif @endforeach>
|
||||
@break
|
||||
@case ('textarea')
|
||||
<textarea @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif class="f-ctrl f-ytxtarea" id="id-{{ $key }}" name="{{ $key }}" @if ($cur['data']) @foreach ($cur['data'] as $k => $v) data-{{ $k }}="{{ $v }}" @endforeach @endif>{{ $cur['value'] or '' }}</textarea>
|
||||
<textarea id="id-{{ $key }}" name="{{ $key }}" class="f-ctrl f-ytxtarea" @foreach ($cur as $k => $v) @if (\in_array($k, ['autofocus', 'disabled', 'readonly', 'required'], true) && ! empty($v)) {!! $k !!} @elseif (\in_array($k, ['maxlength', 'placeholder', 'rows', 'title'], true)) {!! $k !!}="{{ $v }}" @elseif ('data' === $k) @foreach ($v as $kd => $vd) data-{{ $kd }}="{{ $vd }}" @endforeach @endif @endforeach>{{ $cur['value'] or '' }}</textarea>
|
||||
@break
|
||||
@case ('select')
|
||||
<select @if ($cur['required']) required @endif @if ($cur['disabled']) disabled @endif @if ($cur['autofocus']) autofocus @endif @if ($cur['size']) size="{{ $cur['size'] }}" multiple name="{{ $key }}[]" @else name="{{ $key }}" @endif class="f-ctrl" id="id-{{ $key }}">
|
||||
<select id="id-{{ $key }}" @if ($cur['multiple']) name="{{ $key }}[]" @else name="{{ $key }}" @endif class="f-ctrl" @foreach ($cur as $k => $v) @if (\in_array($k, ['autofocus', 'disabled', 'multiple', 'required'], true) && ! empty($v)) {!! $k !!} @elseif (\in_array($k, ['size'], true)) {!! $k !!}="{{ $v }}" @endif @endforeach>
|
||||
@if (!($count = null) && \is_array(\reset($cur['options'])) && 1 === \count(\reset($cur['options'])) && ($count = 0)) @endif
|
||||
@foreach ($cur['options'] as $v => $option)
|
||||
@if (\is_array($option))
|
||||
|
@ -60,35 +63,26 @@
|
|||
@endif
|
||||
</select>
|
||||
@break
|
||||
@case ('number')
|
||||
<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="number" min="{{ $cur['min'] }}" max="{{ $cur['max'] }}" @isset ($cur['value']) value="{{ $cur['value'] }}" @endisset>
|
||||
@break
|
||||
@case ('checkbox')
|
||||
<label class="f-flblch"><input @if ($cur['autofocus']) autofocus @endif @if ($cur['disabled']) disabled @endif type="checkbox" class="f-ychk" id="id-{{ $key }}" name="{{ $key }}" value="{{ $cur['value'] or '1' }}" @if ($cur['checked']) checked @endif>@isset ($cur['label']){!! __($cur['label']) !!}@endif</label>
|
||||
<label class="f-flblch"><input id="id-{{ $key }}" name="{{ $key }}" class="f-ychk" type="checkbox" @foreach ($cur as $k => $v) @if (\in_array($k, ['autofocus', 'disabled', 'checked'], true) && ! empty($v)) {!! $k !!} @endif @endforeach value="{{ $cur['value'] or '1' }}"> @isset ($cur['label']){!! __($cur['label']) !!} @endisset</label>
|
||||
@break
|
||||
@case ('radio')
|
||||
@foreach ($cur['values'] as $v => $n)
|
||||
<label class="f-flblr"><input @if ($cur['autofocus']) autofocus @endif @if ($cur['disabled']) disabled @endif type="radio" class="f-yradio" id="id-{{ $key }}-{{ $v }}" name="{{ $key }}" value="{{ $v }}" @if ($v == $cur['value']) checked @endif>{{ $n }}</label>
|
||||
<label class="f-flblr"><input id="id-{{ $key }}-{{ $v }}" name="{{ $key }}" class="f-yradio" type="radio" @if ($cur['autofocus']) autofocus @endif @if ($cur['disabled']) disabled @endif value="{{ $v }}" @if ($v == $cur['value']) checked @endif>{{ $n }}</label>
|
||||
@endforeach
|
||||
@break
|
||||
@case ('password')
|
||||
<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="password" @if ($cur['maxlength']) maxlength="{{ $cur['maxlength'] }}" @endif @if ($cur['pattern']) pattern="{{ $cur['pattern'] }}" @endif @isset ($cur['value']) value="{{ $cur['value'] }}" @endisset>
|
||||
@break
|
||||
@case ('btn' === $cur['type'])
|
||||
<a class="f-btn f-ybtn @if ($cur['disabled']) f-disabled @endif" href="{{ $cur['link'] or '' }}" title="{{ $cur['title'] or '' }}" @if ($cur['disabled']) tabindex="-1" @endif>{{ $cur['value'] }}</a>
|
||||
@break
|
||||
@case ('str')
|
||||
<p class="f-str" id="id-{{ $key }}"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
|
||||
@case ('btn')
|
||||
<a id="id-{{ $key }}" class="f-btn f-ybtn @if ($cur['disabled']) f-disabled @endif" href="{{ $cur['link'] or '' }}" title="{{ $cur['title'] or $cur['value'] }}" @if ($cur['disabled']) tabindex="-1" @endif>{{ $cur['value'] }}</a>
|
||||
@break
|
||||
@case ('link')
|
||||
<a class="f-link" id="id-{{ $key }}" href="{{ $cur['href'] or '' }}" @isset ($cur['rel']) rel="{{ $cur['rel'] }}" @endisset title="{{ $cur['title'] or '' }}">{{ $cur['value'] or '' }}</a>
|
||||
<a id="id-{{ $key }}" class="f-link" href="{{ $cur['href'] or '' }}" @if ($cur['rel']) rel="{{ $cur['rel'] }}" @endif title="{{ $cur['title'] or $cur['value'] }}">{{ $cur['value'] }}</a>
|
||||
@break
|
||||
@case ('str')
|
||||
<p id="id-{{ $key }}" class="f-str"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
|
||||
@break
|
||||
@case ('yield')
|
||||
{!! $this->block($cur['value']) !!}
|
||||
@break
|
||||
@case ('file')
|
||||
<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="file" @if ($cur['accept']) accept="{{ $cur['accept'] }}" @endif>
|
||||
@break
|
||||
@endswitch
|
||||
@if ($cur['help'])
|
||||
<p class="f-yhint">{!! __($cur['help']) !!}</p>
|
||||
|
@ -118,7 +112,7 @@
|
|||
@if ('submit' === $cur['type'])
|
||||
<button class="f-btn f-fbtn @if($cur['class']) {{ \implode(' ', $cur['class']) }} @endif" name="{{ $key }}" value="{{ $cur['value'] }}" @isset ($cur['accesskey']) accesskey="{{ $cur['accesskey'] }}" @endisset title="{{ $cur['value'] }}"><span>{{ $cur['value'] }}</span></button>
|
||||
@elseif ('btn'=== $cur['type'])
|
||||
<a class="f-btn f-fbtn @if($cur['class']) {{ \implode(' ', $cur['class']) }} @endif" data-name="{{ $key }}" href="{{ $cur['link'] }}" @isset ($cur['accesskey']) accesskey="{{ $cur['accesskey'] }}" @endisset title="{{ $cur['value'] }}"><span>{{ $cur['value'] }}</span></a>
|
||||
<a class="f-btn f-fbtn @if($cur['class']) {{ \implode(' ', $cur['class']) }} @endif" data-name="{{ $key }}" href="{{ $cur['href'] }}" @isset ($cur['accesskey']) accesskey="{{ $cur['accesskey'] }}" @endisset title="{{ $cur['value'] }}"><span>{{ $cur['value'] }}</span></a>
|
||||
@endif
|
||||
@endforeach
|
||||
</p>
|
||||
|
|
|
@ -727,7 +727,7 @@
|
|||
}
|
||||
|
||||
#forka .f-field-handler .f-ytxtarea,
|
||||
#forka .f-field-format .f-ytxt {
|
||||
#forka .f-field-format .f-ctrl {
|
||||
font-family: "DejaVu Sans Mono", Consolas, "Droid Sans Mono", Monospace, Monaco, "Courier New", Courier;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue