Fix merge with upstream
This commit is contained in:
@ -32,7 +32,7 @@ use yii\helpers\Html;
|
||||
]
|
||||
); ?>
|
||||
|
||||
<?= $this->render('_user', ['form' => $form, 'user' => $user]) ?>
|
||||
<?= $this->render('/admin/_user', ['form' => $form, 'user' => $user]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-3 col-lg-9">
|
||||
|
||||
@ -96,7 +96,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
]
|
||||
); ?>
|
||||
|
||||
<?= $this->render('_user', ['form' => $form, 'user' => $user]) ?>
|
||||
<?= $this->render('/admin/_user', ['form' => $form, 'user' => $user]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-3 col-lg-9">
|
||||
|
||||
@ -52,7 +52,7 @@ $module = Yii::$app->getModule('user');
|
||||
'attribute' => 'created_at',
|
||||
'value' => function ($model) {
|
||||
if (extension_loaded('intl')) {
|
||||
return Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]);
|
||||
return Yii::t('usuario', '{0, date, MMM dd, YYYY HH:mm}', [$model->created_at]);
|
||||
}
|
||||
|
||||
return date('Y-m-d G:i:s', $model->created_at);
|
||||
@ -64,12 +64,21 @@ $module = Yii::$app->getModule('user');
|
||||
if (!$model->last_login_at || $model->last_login_at == 0) {
|
||||
return Yii::t('usuario', 'Never');
|
||||
} elseif (extension_loaded('intl')) {
|
||||
return Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$model->last_login_at]);
|
||||
return Yii::t('usuario', '{0, date, MMM dd, YYYY HH:mm}', [$model->last_login_at]);
|
||||
} else {
|
||||
return date('Y-m-d G:i:s', $model->last_login_at);
|
||||
}
|
||||
},
|
||||
],
|
||||
[
|
||||
'attribute' => 'last_login_ip',
|
||||
'value' => function ($model) {
|
||||
return $model->last_login_ip == null
|
||||
? '<span class="not-set">' . Yii::t('usuario', '(not set)') . '</span>'
|
||||
: $model->last_login_ip;
|
||||
},
|
||||
'format' => 'html',
|
||||
],
|
||||
[
|
||||
'header' => Yii::t('usuario', 'Confirmation'),
|
||||
'value' => function ($model) {
|
||||
@ -92,6 +101,7 @@ $module = Yii::$app->getModule('user');
|
||||
'format' => 'raw',
|
||||
'visible' => Yii::$app->getModule('user')->enableEmailConfirmation,
|
||||
],
|
||||
'password_age',
|
||||
[
|
||||
'header' => Yii::t('usuario', 'Block status'),
|
||||
'value' => function ($model) {
|
||||
@ -121,7 +131,7 @@ $module = Yii::$app->getModule('user');
|
||||
],
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{switch} {update} {delete}',
|
||||
'template' => '{switch} {reset} {force-password-change} {update} {delete}',
|
||||
'buttons' => [
|
||||
'switch' => function ($url, $model) use ($module) {
|
||||
if ($model->id != Yii::$app->user->id && $module->enableSwitchIdentities) {
|
||||
@ -140,7 +150,42 @@ $module = Yii::$app->getModule('user');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
},
|
||||
'reset' => function ($url, $model) use ($module) {
|
||||
if(!$module->allowPasswordRecovery && $module->allowAdminPasswordRecovery) {
|
||||
return Html::a(
|
||||
'<span class="glyphicon glyphicon-flash"></span>',
|
||||
['/user/admin/password-reset', 'id' => $model->id],
|
||||
[
|
||||
'title' => Yii::t('usuario', 'Send password recovery email'),
|
||||
'data-confirm' => Yii::t(
|
||||
'usuario',
|
||||
'Are you sure you wish to send a password recovery email to this user?'
|
||||
),
|
||||
'data-method' => 'POST',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
'force-password-change' => function ($url, $model) use ($module) {
|
||||
if (is_null($module->maxPasswordAge)) {
|
||||
return null;
|
||||
}
|
||||
return Html::a(
|
||||
'<span class="glyphicon glyphicon-time"></span>',
|
||||
['/user/admin/force-password-change', 'id' => $model->id],
|
||||
[
|
||||
'title' => Yii::t('usuario', 'Force password change at next login'),
|
||||
'data-confirm' => Yii::t(
|
||||
'usuario',
|
||||
'Are you sure you wish the user to change their password at next login?'
|
||||
),
|
||||
'data-method' => 'POST',
|
||||
]
|
||||
);
|
||||
},
|
||||
]
|
||||
],
|
||||
],
|
||||
|
||||
@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
'/permission/_form',
|
||||
[
|
||||
'model' => $model,
|
||||
'unassignedItems' => $unassignedItems,
|
||||
|
||||
@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
'/permission/_form',
|
||||
[
|
||||
'model' => $model,
|
||||
'unassignedItems' => $unassignedItems,
|
||||
|
||||
@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
]
|
||||
); ?>
|
||||
|
||||
<?= $form->field($model, 'email') ?>
|
||||
<?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'username') ?>
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
'/role/_form',
|
||||
[
|
||||
'model' => $model,
|
||||
'unassignedItems' => $unassignedItems,
|
||||
|
||||
@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
'/role/_form',
|
||||
[
|
||||
'model' => $model,
|
||||
'unassignedItems' => $unassignedItems,
|
||||
|
||||
@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
'/rule/_form',
|
||||
[
|
||||
'model' => $model,
|
||||
]
|
||||
|
||||
@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>
|
||||
|
||||
<?= $this->render(
|
||||
'_form',
|
||||
'/rule/_form',
|
||||
[
|
||||
'model' => $model,
|
||||
]
|
||||
|
||||
@ -31,7 +31,7 @@ $module = Yii::$app->getModule('user');
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $this->render('_menu') ?>
|
||||
<?= $this->render('/settings/_menu') ?>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
@ -81,7 +81,7 @@ $module = Yii::$app->getModule('user');
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="myModalLabel">
|
||||
<?= Yii::t('usuario', 'Two Factor Authentication') ?></h4>
|
||||
<?= Yii::t('usuario', 'Two Factor Authentication (2FA)') ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
...
|
||||
@ -96,25 +96,25 @@ $module = Yii::$app->getModule('user');
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><?= Yii::t('usuario', 'Two-Factor Authentication') ?></h3>
|
||||
<h3 class="panel-title"><?= Yii::t('usuario', 'Two Factor Authentication (2FA)') ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<?= Yii::t('usuario', 'Two-factor auth protects you against stolen credentials') ?>.
|
||||
<?= Yii::t('usuario', 'Two factor authentication protects you against stolen credentials') ?>.
|
||||
</p>
|
||||
<div class="text-right">
|
||||
<?= Html::a(
|
||||
Yii::t('usuario', 'Disable Two-Factor Auth'),
|
||||
Yii::t('usuario', 'Disable two factor authentication'),
|
||||
['two-factor-disable', 'id' => $model->getUser()->id],
|
||||
[
|
||||
'id' => 'disable_tf_btn',
|
||||
'class' => 'btn btn-warning ' . ($model->getUser()->auth_tf_enabled ? '' : 'hide'),
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t('usuario', 'This will disable two-factor auth. Are you sure?'),
|
||||
'data-confirm' => Yii::t('usuario', 'This will disable two factor authentication. Are you sure?'),
|
||||
]
|
||||
) ?>
|
||||
<?= Html::a(
|
||||
Yii::t('usuario', 'Enable Two-factor auth'),
|
||||
Yii::t('usuario', 'Enable two factor authentication'),
|
||||
'#tfmodal',
|
||||
[
|
||||
'id' => 'enable_tf_btn',
|
||||
|
||||
@ -28,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $this->render('_menu') ?>
|
||||
<?= $this->render('/networks/_menu') ?>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
|
||||
@ -32,7 +32,7 @@ $timezoneHelper = $model->make(TimezoneHelper::class);
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $this->render('_menu') ?>
|
||||
<?= $this->render('/profile/_menu') ?>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
@ -71,7 +71,8 @@ $timezoneHelper = $model->make(TimezoneHelper::class);
|
||||
->hint(
|
||||
Html::a(
|
||||
Yii::t('usuario', 'Change your avatar at Gravatar.com'),
|
||||
'http://gravatar.com'
|
||||
'http://gravatar.com',
|
||||
['target' => '_blank']
|
||||
)
|
||||
) ?>
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-6 text-center">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="tfcode" placeholder="<?= Yii::t('usuario', 'Two-factor code') ?>"/>
|
||||
<input type="text" class="form-control" id="tfcode" placeholder="<?= Yii::t('usuario', 'Two factor authentication code') ?>"/>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary btn-submit-code">
|
||||
<?= Yii::t('usuario', 'Enable') ?>
|
||||
|
||||
@ -32,7 +32,7 @@ use yii\helpers\Html;
|
||||
<h3 class="panel-title"><?= Html::encode($this->title) ?></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?= $this->render('_menu') ?>
|
||||
<?= $this->render('/shared/_menu') ?>
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,7 @@ $this->title = $title;
|
||||
?>
|
||||
|
||||
<?= $this->render(
|
||||
'_alert',
|
||||
'/shared/_alert',
|
||||
[
|
||||
'module' => $module,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user