Update forms and form template
Move translation of 'label' for 'checkbox' from forms to template.
This commit is contained in:
parent
e6ba2c4688
commit
eed8c8be88
18 changed files with 32 additions and 26 deletions
|
@ -206,7 +206,7 @@ class Categories extends Admin
|
|||
'confirm' => [
|
||||
'caption' => 'Confirm delete',
|
||||
'type' => 'checkbox',
|
||||
'label' => __(['I want to delete the category %s', $category['cat_name']]),
|
||||
'label' => ['I want to delete the category %s', $category['cat_name']],
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -524,7 +524,7 @@ class Forums extends Admin
|
|||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'caption' => 'Read forum label',
|
||||
'label' => __('<span></span>'),
|
||||
'label' => '<span></span>',
|
||||
'checked' => $group->set_read_forum,
|
||||
'disabled' => $group->dis_read_forum,
|
||||
];
|
||||
|
@ -533,7 +533,7 @@ class Forums extends Admin
|
|||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'caption' => 'Post replies label',
|
||||
'label' => __('<span></span>'),
|
||||
'label' => '<span></span>',
|
||||
'checked' => $group->set_post_replies,
|
||||
'disabled' => $group->dis_post_replies,
|
||||
];
|
||||
|
@ -542,7 +542,7 @@ class Forums extends Admin
|
|||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'caption' => 'Post topics label',
|
||||
'label' => __('<span></span>'),
|
||||
'label' => '<span></span>',
|
||||
'checked' => $group->set_post_topics,
|
||||
'disabled' => $group->dis_post_topics,
|
||||
];
|
||||
|
|
|
@ -815,7 +815,7 @@ class Groups extends Admin
|
|||
'confirm' => [
|
||||
'caption' => 'Confirm delete',
|
||||
'type' => 'checkbox',
|
||||
'label' => __(['I want to delete this group', $group->g_title]),
|
||||
'label' => ['I want to delete this group', $group->g_title],
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -142,7 +142,7 @@ class Maintenance extends Admin
|
|||
'value' => '1',
|
||||
'checked' => true,
|
||||
'caption' => 'Empty index label',
|
||||
'label' => __('Empty index help'),
|
||||
'label' => 'Empty index help',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
@ -625,7 +625,7 @@ class Options extends Admin
|
|||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'caption' => '',
|
||||
'label' => __('SMTP change password help'),
|
||||
'label' => 'SMTP change password help',
|
||||
],
|
||||
'o_smtp_ssl' => [
|
||||
'type' => 'radio',
|
||||
|
|
|
@ -160,7 +160,7 @@ class Auth extends Page
|
|||
],
|
||||
'save' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Remember me'),
|
||||
'label' => 'Remember me',
|
||||
'value' => '1',
|
||||
'checked' => $save,
|
||||
],
|
||||
|
|
|
@ -118,7 +118,7 @@ class Delete extends Page
|
|||
'fields' => [
|
||||
'confirm' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __($deleteTopic ? 'Confirm delete topic' : 'Confirm delete post'),
|
||||
'label' => $deleteTopic ? 'Confirm delete topic' : 'Confirm delete post',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -600,7 +600,7 @@ class Moderate extends Page
|
|||
if (true === $this->chkRedirect) {
|
||||
$fields['redirect'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Leave redirect'),
|
||||
'label' => 'Leave redirect',
|
||||
'value' => '1',
|
||||
'checked' => true,
|
||||
];
|
||||
|
@ -608,7 +608,7 @@ class Moderate extends Page
|
|||
|
||||
$fields['confirm'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Confirm action'),
|
||||
'label' => 'Confirm action',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
];
|
||||
|
|
|
@ -178,7 +178,7 @@ class PMBlock extends AbstractPM
|
|||
'fields' => [
|
||||
'confirm' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Confirm action'),
|
||||
'label' => 'Confirm action',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -151,7 +151,7 @@ class PMDelete extends AbstractPM
|
|||
'fields' => [
|
||||
'confirm' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Confirm action'),
|
||||
'label' => 'Confirm action',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -164,7 +164,7 @@ class PMTopic extends AbstractPM
|
|||
'fields' => [
|
||||
'confirm' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Confirm action'),
|
||||
'label' => 'Confirm action',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -186,7 +186,7 @@ class PMView extends AbstractPM
|
|||
'fields' => [
|
||||
'confirm' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Confirm action'),
|
||||
'label' => 'Confirm action',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
],
|
||||
|
|
|
@ -114,20 +114,20 @@ trait PostFormTrait
|
|||
if ($first) {
|
||||
$fieldset['stick_topic'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Stick topic'),
|
||||
'label' => 'Stick topic',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['stick_topic'] ?? false),
|
||||
];
|
||||
$fieldset['stick_fp'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Stick first post'),
|
||||
'label' => 'Stick first post',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['stick_fp'] ?? false),
|
||||
];
|
||||
} elseif (! $edit) {
|
||||
$fieldset['merge_post'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Merge posts'),
|
||||
'label' => 'Merge posts',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['merge_post'] ?? true),
|
||||
];
|
||||
|
@ -140,7 +140,7 @@ trait PostFormTrait
|
|||
) {
|
||||
$fieldset['edit_post'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('EditPost edit'),
|
||||
'label' => 'EditPost edit',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['edit_post'] ?? false),
|
||||
];
|
||||
|
@ -164,7 +164,7 @@ trait PostFormTrait
|
|||
} else {
|
||||
$fieldset['subscribe'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => $subscribed ? __('Stay subscribed') : __('New subscribe'),
|
||||
'label' => $subscribed ? 'Stay subscribed' : 'New subscribe',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['subscribe'] ?? ($subscribed || $this->user->auto_notify)),
|
||||
];
|
||||
|
@ -178,7 +178,7 @@ trait PostFormTrait
|
|||
) {
|
||||
$fieldset['hide_smilies'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Hide smilies'),
|
||||
'label' => 'Hide smilies',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['hide_smilies'] ?? false),
|
||||
];
|
||||
|
@ -204,7 +204,7 @@ trait PostFormTrait
|
|||
|
||||
$fieldset['poll_enable'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Include poll'),
|
||||
'label' => 'Include poll',
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['poll_enable'] ?? false),
|
||||
'disabled' => $vars['pollNoEdit'] ?? null,
|
||||
|
@ -220,7 +220,7 @@ trait PostFormTrait
|
|||
];
|
||||
$fieldset['poll[hide_result]'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __(['Hide poll results up to %s voters', $term]),
|
||||
'label' => ['Hide poll results up to %s voters', $term],
|
||||
'value' => '1',
|
||||
'checked' => (bool) ($vars['poll']['hide_result'] ?? false),
|
||||
'disabled' => $vars['pollNoEdit'] ?? null,
|
||||
|
|
|
@ -317,7 +317,7 @@ class Edit extends Profile
|
|||
if ($this->curUser->avatar) {
|
||||
$fields['delete_avatar'] = [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Delete avatar'),
|
||||
'label' => 'Delete avatar',
|
||||
'value' => '1',
|
||||
'checked' => false,
|
||||
];
|
||||
|
|
|
@ -76,7 +76,7 @@ class Rules extends Page
|
|||
'fields' => [
|
||||
'agree' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Agree'),
|
||||
'label' => 'Agree',
|
||||
'value' => $this->c->Csrf->create('Register'),
|
||||
],
|
||||
],
|
||||
|
|
|
@ -131,3 +131,6 @@ msgstr "Count messages for users"
|
|||
|
||||
msgid "Count messages help"
|
||||
msgstr "If YES, then new messages from users in this forum will increase their counter of messages in the profile. You can recalculate messages from all users in <a href=\"%1$s\">%2$s</a>."
|
||||
|
||||
msgid "<span></span>"
|
||||
msgstr "<span></span>"
|
||||
|
|
|
@ -131,3 +131,6 @@ msgstr "Считать сообщения для пользователей"
|
|||
|
||||
msgid "Count messages help"
|
||||
msgstr "Если ДА, то новые сообщения пользователей в этом разделе будут увеличивать их счетчик сообщений в профиле. Пересчитать сообщения всех пользователей можно в <a href=\"%1$s\">%2$s</a>."
|
||||
|
||||
msgid "<span></span>"
|
||||
msgstr "<span></span>"
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
@elseif ('number' === $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="number" min="{{ $cur['min'] }}" max="{{ $cur['max'] }}" @isset ($cur['value']) value="{{ $cur['value'] }}" @endisset>
|
||||
@elseif ('checkbox' === $cur['type'])
|
||||
<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>{!! $cur['label'] or '' !!}</label>
|
||||
<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>
|
||||
@elseif ('radio' === $cur['type'])
|
||||
@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>
|
||||
|
|
Loading…
Add table
Reference in a new issue