wip
This commit is contained in:
@ -37,7 +37,7 @@ use yii\helpers\Html;
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-3 col-lg-9">
|
||||
<?= Html::submitButton(Yii::t('user', 'Update'), ['class' => 'btn btn-block btn-success']) ?>
|
||||
<?= Html::submitButton(Yii::t('usuario', 'Update'), ['class' => 'btn btn-block btn-success']) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ use Da\User\Widget\AssignmentsWidget;
|
||||
'options' => [
|
||||
'class' => 'alert-info alert-dismissible',
|
||||
],
|
||||
'body' => Yii::t('user', 'You can assign multiple roles or permissions to user by using the form below'),
|
||||
'body' => Yii::t('usuario', 'You can assign multiple roles or permissions to user by using the form below'),
|
||||
]
|
||||
) ?>
|
||||
|
||||
|
||||
@ -19,38 +19,38 @@
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td><strong><?= Yii::t('user', 'Registration time') ?>:</strong></td>
|
||||
<td><?= Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$user->created_at]) ?></td>
|
||||
<td><strong><?= Yii::t('usuario', 'Registration time') ?>:</strong></td>
|
||||
<td><?= Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$user->created_at]) ?></td>
|
||||
</tr>
|
||||
<?php if ($user->registration_ip !== null): ?>
|
||||
<tr>
|
||||
<td><strong><?= Yii::t('user', 'Registration IP') ?>:</strong></td>
|
||||
<td><strong><?= Yii::t('usuario', 'Registration IP') ?>:</strong></td>
|
||||
<td><?= $user->registration_ip ?></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<td><strong><?= Yii::t('user', 'Confirmation status') ?>:</strong></td>
|
||||
<td><strong><?= Yii::t('usuario', 'Confirmation status') ?>:</strong></td>
|
||||
<?php if ($user->isConfirmed): ?>
|
||||
<td class="text-success"><?= Yii::t(
|
||||
'user',
|
||||
'usuario',
|
||||
'Confirmed at {0, date, MMMM dd, YYYY HH:mm}',
|
||||
[$user->confirmed_at]
|
||||
) ?></td>
|
||||
<?php else: ?>
|
||||
<td class="text-danger"><?= Yii::t('user', 'Unconfirmed') ?></td>
|
||||
<td class="text-danger"><?= Yii::t('usuario', 'Unconfirmed') ?></td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><?= Yii::t('user', 'Block status') ?>:</strong></td>
|
||||
<td><strong><?= Yii::t('usuario', 'Block status') ?>:</strong></td>
|
||||
<?php if ($user->isBlocked): ?>
|
||||
<td class="text-danger"><?= Yii::t(
|
||||
'user',
|
||||
'usuario',
|
||||
'Blocked at {0, date, MMMM dd, YYYY HH:mm}',
|
||||
[$user->blocked_at]
|
||||
) ?>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td class="text-success"><?= Yii::t('user', 'Not blocked') ?></td>
|
||||
<td class="text-success"><?= Yii::t('usuario', 'Not blocked') ?></td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -45,7 +45,7 @@ use yii\helpers\Html;
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-3 col-lg-9">
|
||||
<?= Html::submitButton(Yii::t('user', 'Update'), ['class' => 'btn btn-block btn-success']) ?>
|
||||
<?= Html::submitButton(Yii::t('usuario', 'Update'), ['class' => 'btn btn-block btn-success']) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -18,8 +18,8 @@ use yii\helpers\Html;
|
||||
* @var \Da\User\Model\User $user
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('user', 'Create a user account');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
|
||||
$this->title = Yii::t('usuario', 'Create a user account');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('usuario', 'Users'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
@ -50,18 +50,18 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
'items' => [
|
||||
[
|
||||
'label' => Yii::t('user', 'Account details'),
|
||||
'label' => Yii::t('usuario', 'Account details'),
|
||||
'url' => ['/user/admin/create'],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Profile details'),
|
||||
'label' => Yii::t('usuario', 'Profile details'),
|
||||
'options' => [
|
||||
'class' => 'disabled',
|
||||
'onclick' => 'return false;',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Information'),
|
||||
'label' => Yii::t('usuario', 'Information'),
|
||||
'options' => [
|
||||
'class' => 'disabled',
|
||||
'onclick' => 'return false;',
|
||||
@ -77,8 +77,8 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-info">
|
||||
<?= Yii::t('user', 'Credentials will be sent to the user by email') ?>.
|
||||
<?= Yii::t('user', 'A password will be generated automatically if not provided') ?>.
|
||||
<?= Yii::t('usuario', 'Credentials will be sent to the user by email') ?>.
|
||||
<?= Yii::t('usuario', 'A password will be generated automatically if not provided') ?>.
|
||||
</div>
|
||||
<?php $form = ActiveForm::begin(
|
||||
[
|
||||
@ -98,7 +98,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-3 col-lg-9">
|
||||
<?= Html::submitButton(
|
||||
Yii::t('user', 'Save'),
|
||||
Yii::t('usuario', 'Save'),
|
||||
['class' => 'btn btn-block btn-success']
|
||||
) ?>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,7 @@ use yii\widgets\Pjax;
|
||||
* @var $searchModel Da\User\Search\UserSearch
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('user', 'Manage users');
|
||||
$this->title = Yii::t('usuario', 'Manage users');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
|
||||
@ -40,7 +40,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'registration_ip',
|
||||
'value' => function ($model) {
|
||||
return $model->registration_ip == null
|
||||
? '<span class="not-set">'.Yii::t('user', '(not set)').'</span>'
|
||||
? '<span class="not-set">'.Yii::t('usuario', '(not set)').'</span>'
|
||||
: $model->registration_ip;
|
||||
},
|
||||
'format' => 'html',
|
||||
@ -49,27 +49,27 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'created_at',
|
||||
'value' => function ($model) {
|
||||
if (extension_loaded('intl')) {
|
||||
return Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]);
|
||||
return Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]);
|
||||
} else {
|
||||
return date('Y-m-d G:i:s', $model->created_at);
|
||||
}
|
||||
},
|
||||
],
|
||||
[
|
||||
'header' => Yii::t('user', 'Confirmation'),
|
||||
'header' => Yii::t('usuario', 'Confirmation'),
|
||||
'value' => function ($model) {
|
||||
if ($model->isConfirmed) {
|
||||
return '<div class="text-center">
|
||||
<span class="text-success">' .Yii::t('user', 'Confirmed').'</span>
|
||||
<span class="text-success">' .Yii::t('usuario', 'Confirmed').'</span>
|
||||
</div>';
|
||||
} else {
|
||||
return Html::a(
|
||||
Yii::t('user', 'Confirm'),
|
||||
Yii::t('usuario', 'Confirm'),
|
||||
['confirm', 'id' => $model->id],
|
||||
[
|
||||
'class' => 'btn btn-xs btn-success btn-block',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?'),
|
||||
'data-confirm' => Yii::t('usuario', 'Are you sure you want to confirm this user?'),
|
||||
]
|
||||
);
|
||||
}
|
||||
@ -78,26 +78,26 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'visible' => Yii::$app->getModule('user')->enableEmailConfirmation,
|
||||
],
|
||||
[
|
||||
'header' => Yii::t('user', 'Block status'),
|
||||
'header' => Yii::t('usuario', 'Block status'),
|
||||
'value' => function ($model) {
|
||||
if ($model->isBlocked) {
|
||||
return Html::a(
|
||||
Yii::t('user', 'Unblock'),
|
||||
Yii::t('usuario', 'Unblock'),
|
||||
['block', 'id' => $model->id],
|
||||
[
|
||||
'class' => 'btn btn-xs btn-success btn-block',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t('user', 'Are you sure you want to unblock this user?'),
|
||||
'data-confirm' => Yii::t('usuario', 'Are you sure you want to unblock this user?'),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
return Html::a(
|
||||
Yii::t('user', 'Block'),
|
||||
Yii::t('usuario', 'Block'),
|
||||
['block', 'id' => $model->id],
|
||||
[
|
||||
'class' => 'btn btn-xs btn-danger btn-block',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t('user', 'Are you sure you want to block this user?'),
|
||||
'data-confirm' => Yii::t('usuario', 'Are you sure you want to block this user?'),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -20,8 +20,8 @@ use yii\helpers\Html;
|
||||
* @var string $content
|
||||
*/
|
||||
|
||||
$this->title = Yii::t('user', 'Update user account');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
|
||||
$this->title = Yii::t('usuario', 'Update user account');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('usuario', 'Users'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
@ -52,69 +52,69 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
'items' => [
|
||||
[
|
||||
'label' => Yii::t('user', 'Account details'),
|
||||
'label' => Yii::t('usuario', 'Account details'),
|
||||
'url' => ['/user/admin/update', 'id' => $user->id],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Profile details'),
|
||||
'label' => Yii::t('usuario', 'Profile details'),
|
||||
'url' => ['/user/admin/update-profile', 'id' => $user->id],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Information'),
|
||||
'label' => Yii::t('usuario', 'Information'),
|
||||
'url' => ['/user/admin/info', 'id' => $user->id],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Assignments'),
|
||||
'label' => Yii::t('usuario', 'Assignments'),
|
||||
'url' => ['/user/admin/assignments', 'id' => $user->id],
|
||||
],
|
||||
'<hr>',
|
||||
[
|
||||
'label' => Yii::t('user', 'Confirm'),
|
||||
'label' => Yii::t('usuario', 'Confirm'),
|
||||
'url' => ['/user/admin/confirm', 'id' => $user->id],
|
||||
'visible' => !$user->isConfirmed,
|
||||
'linkOptions' => [
|
||||
'class' => 'text-success',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t(
|
||||
'user',
|
||||
'usuario',
|
||||
'Are you sure you want to confirm this user?'
|
||||
),
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Block'),
|
||||
'label' => Yii::t('usuario', 'Block'),
|
||||
'url' => ['/user/admin/block', 'id' => $user->id],
|
||||
'visible' => !$user->isBlocked,
|
||||
'linkOptions' => [
|
||||
'class' => 'text-danger',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t(
|
||||
'user',
|
||||
'usuario',
|
||||
'Are you sure you want to block this user?'
|
||||
),
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Unblock'),
|
||||
'label' => Yii::t('usuario', 'Unblock'),
|
||||
'url' => ['/user/admin/block', 'id' => $user->id],
|
||||
'visible' => $user->isBlocked,
|
||||
'linkOptions' => [
|
||||
'class' => 'text-success',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t(
|
||||
'user',
|
||||
'usuario',
|
||||
'Are you sure you want to unblock this user?'
|
||||
),
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('user', 'Delete'),
|
||||
'label' => Yii::t('usuario', 'Delete'),
|
||||
'url' => ['/user/admin/delete', 'id' => $user->id],
|
||||
'linkOptions' => [
|
||||
'class' => 'text-danger',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t(
|
||||
'user',
|
||||
'usuario',
|
||||
'Are you sure you want to delete this user?'
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user