wip
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@ -44,3 +44,8 @@ tests/_output/*
|
|||||||
|
|
||||||
# ignore local codeception settings
|
# ignore local codeception settings
|
||||||
codeception.yml
|
codeception.yml
|
||||||
|
|
||||||
|
# Code Style Checkers and Mess Detectors
|
||||||
|
/phpcs.xml
|
||||||
|
/.php_cs.cache
|
||||||
|
/.php_cs
|
||||||
|
|||||||
@ -52,9 +52,9 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"cebe/assetfree-yii2": "~2.0.0",
|
"cebe/assetfree-yii2": "~2.0.0",
|
||||||
"squizlabs/php_codesniffer": "^2.7",
|
|
||||||
"friendsofphp/php-cs-fixer": "^2.0",
|
"friendsofphp/php-cs-fixer": "^2.0",
|
||||||
"phpmd/phpmd": "^2.4",
|
"squizlabs/php_codesniffer": "*",
|
||||||
|
"phpmd/phpmd": "@stable",
|
||||||
"yiisoft/yii2-codeception": "^2.0.0",
|
"yiisoft/yii2-codeception": "^2.0.0",
|
||||||
"codeception/specify": "^0.4.3",
|
"codeception/specify": "^0.4.3",
|
||||||
"codeception/verify": "^0.3.1",
|
"codeception/verify": "^0.3.1",
|
||||||
|
|||||||
8
composer.lock
generated
8
composer.lock
generated
@ -4,8 +4,8 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "c5d975a6e617b48ce160709adc44e2e8",
|
"hash": "a3487c38850210a1f70ecbd47629a680",
|
||||||
"content-hash": "7fdd28c9923beb31bca84e428ae41146",
|
"content-hash": "2a2695eba4d025ba76be8783e6f80d6d",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "2amigos/yii2-selectize-widget",
|
"name": "2amigos/yii2-selectize-widget",
|
||||||
@ -3852,7 +3852,9 @@
|
|||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {
|
||||||
|
"phpmd/phpmd": 0
|
||||||
|
},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -36,5 +36,6 @@ Other
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
- [Contriburing to Documentation](other/contriburing-to-documentation.md)
|
- [Contriburing to Documentation](other/contriburing-to-documentation.md)
|
||||||
|
- [Other for Developers](other/other-for-developers.md)
|
||||||
|
|
||||||
© [2amigos](http://www.2amigos.us/) 2016
|
© [2amigos](http://www.2amigos.us/) 2016
|
||||||
|
|||||||
32
docs/other/other-for-developers.md
Normal file
32
docs/other/other-for-developers.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Other for Developers
|
||||||
|
====================
|
||||||
|
|
||||||
|
Tests
|
||||||
|
-----
|
||||||
|
|
||||||
|
1. First of all
|
||||||
|
2. Running tests: `./vendor`
|
||||||
|
|
||||||
|
Code Style Checkers and Mess Detectors
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
## [squizlabs/PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
|
||||||
|
|
||||||
|
Global settings file: `phpcs.xml.dist` (added into Git)
|
||||||
|
Local settings file (you can add it locally): `phpcs.xml` (ignored by Git)
|
||||||
|
|
||||||
|
Run checking by `PHP_CodeSniffer`: `./vendor/bin/phpcs`
|
||||||
|
Show check report in patch form: `./vendor/bin/phpcs --report=diff`
|
||||||
|
Automatically fix all fixable issues: `./vendor/bin/phpcbf`
|
||||||
|
|
||||||
|
## [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)
|
||||||
|
|
||||||
|
Global settings file: `.php_cs.dist` (added into Git)
|
||||||
|
Local settings file (you can add it locally): `.php_cs` (ignored by Git)
|
||||||
|
|
||||||
|
Run checking by `PHP-CS-Fixer`: `./vendor/bin/php-cs-fixer fix --dry-run`
|
||||||
|
Automatically fix all fixable issues: `./vendor/bin/php-cs-fixer fix`
|
||||||
|
|
||||||
|
## [phpmd/phpmd](https://github.com/phpmd/phpmd)
|
||||||
|
|
||||||
|
TODO:
|
||||||
@ -45,6 +45,6 @@ class VKontakte extends BaseVKontakte implements AuthClientInterface
|
|||||||
*/
|
*/
|
||||||
protected function defaultTitle()
|
protected function defaultTitle()
|
||||||
{
|
{
|
||||||
return Yii::t('user', 'VKontakte');
|
return Yii::t('usuario', 'VKontakte');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,6 +48,6 @@ class Yandex extends BaseYandex implements AuthClientInterface
|
|||||||
*/
|
*/
|
||||||
protected function defaultTitle()
|
protected function defaultTitle()
|
||||||
{
|
{
|
||||||
return Yii::t('user', 'Yandex');
|
return Yii::t('usuario', 'Yandex');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,8 +162,8 @@ class Bootstrap implements BootstrapInterface
|
|||||||
*/
|
*/
|
||||||
protected function initTranslations(Application $app)
|
protected function initTranslations(Application $app)
|
||||||
{
|
{
|
||||||
if (!isset($app->get('i18n')->translations['user*'])) {
|
if (!isset($app->get('i18n')->translations['usuario*'])) {
|
||||||
$app->get('i18n')->translations['user*'] = [
|
$app->get('i18n')->translations['usuario*'] = [
|
||||||
'class' => PhpMessageSource::class,
|
'class' => PhpMessageSource::class,
|
||||||
'basePath' => __DIR__.'/resources/i18n',
|
'basePath' => __DIR__.'/resources/i18n',
|
||||||
'sourceLanguage' => 'en-US',
|
'sourceLanguage' => 'en-US',
|
||||||
@ -221,10 +221,10 @@ class Bootstrap implements BootstrapInterface
|
|||||||
{
|
{
|
||||||
$defaults = [
|
$defaults = [
|
||||||
'fromEmail' => 'no-reply@example.com',
|
'fromEmail' => 'no-reply@example.com',
|
||||||
'welcomeMailSubject' => Yii::t('user', 'Welcome to {0}', $app->name),
|
'welcomeMailSubject' => Yii::t('usuario', 'Welcome to {0}', $app->name),
|
||||||
'confirmationMailSubject' => Yii::t('user', 'Confirm account on {0}', $app->name),
|
'confirmationMailSubject' => Yii::t('usuario', 'Confirm account on {0}', $app->name),
|
||||||
'reconfirmationMailSubject' => Yii::t('user', 'Confirm email change on {0}', $app->name),
|
'reconfirmationMailSubject' => Yii::t('usuario', 'Confirm email change on {0}', $app->name),
|
||||||
'recoveryMailSubject' => Yii::t('user', 'Complete password reset on {0}', $app->name),
|
'recoveryMailSubject' => Yii::t('usuario', 'Complete password reset on {0}', $app->name),
|
||||||
];
|
];
|
||||||
|
|
||||||
$module->mailParams = array_merge($defaults, $module->mailParams);
|
$module->mailParams = array_merge($defaults, $module->mailParams);
|
||||||
|
|||||||
@ -36,12 +36,12 @@ class ConfirmController extends Controller
|
|||||||
{
|
{
|
||||||
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
||||||
if ($user === null) {
|
if ($user === null) {
|
||||||
$this->stdout(Yii::t('user', 'User is not found')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'User is not found')."\n", Console::FG_RED);
|
||||||
} else {
|
} else {
|
||||||
if ($this->make(UserConfirmationService::class, [$user])->run()) {
|
if ($this->make(UserConfirmationService::class, [$user])->run()) {
|
||||||
$this->stdout(Yii::t('user', 'User has been confirmed')."\n", Console::FG_GREEN);
|
$this->stdout(Yii::t('usuario', 'User has been confirmed')."\n", Console::FG_GREEN);
|
||||||
} else {
|
} else {
|
||||||
$this->stdout(Yii::t('user', 'Error occurred while confirming user')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'Error occurred while confirming user')."\n", Console::FG_RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,9 +32,9 @@ class CreateController extends Controller
|
|||||||
$mailService = MailFactory::makeWelcomeMailerService($user);
|
$mailService = MailFactory::makeWelcomeMailerService($user);
|
||||||
|
|
||||||
if ($this->make(UserCreateService::class, [$user, $mailService])->run()) {
|
if ($this->make(UserCreateService::class, [$user, $mailService])->run()) {
|
||||||
$this->stdout(Yii::t('user', 'User has been created')."!\n", Console::FG_GREEN);
|
$this->stdout(Yii::t('usuario', 'User has been created')."!\n", Console::FG_GREEN);
|
||||||
} else {
|
} else {
|
||||||
$this->stdout(Yii::t('user', 'Please fix following errors:')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'Please fix following errors:')."\n", Console::FG_RED);
|
||||||
foreach ($user->errors as $errors) {
|
foreach ($user->errors as $errors) {
|
||||||
foreach ($errors as $error) {
|
foreach ($errors as $error) {
|
||||||
$this->stdout(' - '.$error."\n", Console::FG_RED);
|
$this->stdout(' - '.$error."\n", Console::FG_RED);
|
||||||
|
|||||||
@ -29,15 +29,15 @@ class DeleteController extends Controller
|
|||||||
|
|
||||||
public function actionIndex($usernameOrEmail)
|
public function actionIndex($usernameOrEmail)
|
||||||
{
|
{
|
||||||
if ($this->confirm(Yii::t('user', 'Are you sure? Deleted user can not be restored'))) {
|
if ($this->confirm(Yii::t('usuario', 'Are you sure? Deleted user can not be restored'))) {
|
||||||
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
||||||
if ($user === null) {
|
if ($user === null) {
|
||||||
$this->stdout(Yii::t('user', 'User is not found')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'User is not found')."\n", Console::FG_RED);
|
||||||
} else {
|
} else {
|
||||||
if ($user->delete()) {
|
if ($user->delete()) {
|
||||||
$this->stdout(Yii::t('user', 'User has been deleted')."\n", Console::FG_GREEN);
|
$this->stdout(Yii::t('usuario', 'User has been deleted')."\n", Console::FG_GREEN);
|
||||||
} else {
|
} else {
|
||||||
$this->stdout(Yii::t('user', 'Error occurred while deleting user')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'Error occurred while deleting user')."\n", Console::FG_RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,12 +38,12 @@ class PasswordController extends Controller
|
|||||||
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
$user = $this->userQuery->whereUsernameOrEmail($usernameOrEmail)->one();
|
||||||
|
|
||||||
if ($user === null) {
|
if ($user === null) {
|
||||||
$this->stdout(Yii::t('user', 'User is not found')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'User is not found')."\n", Console::FG_RED);
|
||||||
} else {
|
} else {
|
||||||
if ($this->make(ResetPasswordService::class, [$password, $user])->run()) {
|
if ($this->make(ResetPasswordService::class, [$password, $user])->run()) {
|
||||||
$this->stdout(Yii::t('user', 'Password has been changed')."\n", Console::FG_GREEN);
|
$this->stdout(Yii::t('usuario', 'Password has been changed')."\n", Console::FG_GREEN);
|
||||||
} else {
|
} else {
|
||||||
$this->stdout(Yii::t('user', 'Error occurred while changing password')."\n", Console::FG_RED);
|
$this->stdout(Yii::t('usuario', 'Error occurred while changing password')."\n", Console::FG_RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,11 +89,11 @@ abstract class AbstractAuthItemController extends Controller
|
|||||||
if ($this->make(AuthItemEditionService::class, [$model])->run()) {
|
if ($this->make(AuthItemEditionService::class, [$model])->run()) {
|
||||||
Yii::$app
|
Yii::$app
|
||||||
->getSession()
|
->getSession()
|
||||||
->setFlash('success', Yii::t('user', 'Authorization item successfully created.'));
|
->setFlash('success', Yii::t('usuario', 'Authorization item successfully created.'));
|
||||||
|
|
||||||
return $this->redirect(['index']);
|
return $this->redirect(['index']);
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'Unable to create authorization item.'));
|
Yii::$app->getSession()->setFlash('danger', Yii::t('usuario', 'Unable to create authorization item.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,11 +119,11 @@ abstract class AbstractAuthItemController extends Controller
|
|||||||
if ($this->make(AuthItemEditionService::class, [$model])->run()) {
|
if ($this->make(AuthItemEditionService::class, [$model])->run()) {
|
||||||
Yii::$app
|
Yii::$app
|
||||||
->getSession()
|
->getSession()
|
||||||
->setFlash('success', Yii::t('user', 'Authorization item successfully updated.'));
|
->setFlash('success', Yii::t('usuario', 'Authorization item successfully updated.'));
|
||||||
|
|
||||||
return $this->redirect(['index']);
|
return $this->redirect(['index']);
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'Unable to update authorization item.'));
|
Yii::$app->getSession()->setFlash('danger', Yii::t('usuario', 'Unable to update authorization item.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,9 +141,9 @@ abstract class AbstractAuthItemController extends Controller
|
|||||||
$item = $this->getItem($name);
|
$item = $this->getItem($name);
|
||||||
|
|
||||||
if ($this->authHelper->remove($item)) {
|
if ($this->authHelper->remove($item)) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Authorization item successfully removed.'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Authorization item successfully removed.'));
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Unable to remove authorization item.'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Unable to remove authorization item.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirect(['index']);
|
return $this->redirect(['index']);
|
||||||
|
|||||||
@ -127,7 +127,7 @@ class AdminController extends Controller
|
|||||||
$mailService = MailFactory::makeWelcomeMailerService($user);
|
$mailService = MailFactory::makeWelcomeMailerService($user);
|
||||||
|
|
||||||
if ($this->make(UserCreateService::class, [$user, $mailService])->run()) {
|
if ($this->make(UserCreateService::class, [$user, $mailService])->run()) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User has been created'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'User has been created'));
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_CREATE, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_CREATE, $event);
|
||||||
|
|
||||||
return $this->redirect(['update', 'id' => $user->id]);
|
return $this->redirect(['update', 'id' => $user->id]);
|
||||||
@ -150,7 +150,7 @@ class AdminController extends Controller
|
|||||||
$this->trigger(ActiveRecord::EVENT_BEFORE_UPDATE, $event);
|
$this->trigger(ActiveRecord::EVENT_BEFORE_UPDATE, $event);
|
||||||
|
|
||||||
if ($user->save()) {
|
if ($user->save()) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Account details have been updated'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Account details have been updated'));
|
||||||
$this->trigger(ActiveRecord::EVENT_AFTER_UPDATE, $event);
|
$this->trigger(ActiveRecord::EVENT_AFTER_UPDATE, $event);
|
||||||
|
|
||||||
return $this->refresh();
|
return $this->refresh();
|
||||||
@ -177,7 +177,7 @@ class AdminController extends Controller
|
|||||||
if ($profile->load(Yii::$app->request->post())) {
|
if ($profile->load(Yii::$app->request->post())) {
|
||||||
if ($profile->save()) {
|
if ($profile->save()) {
|
||||||
$this->trigger(UserEvent::EVENT_BEFORE_PROFILE_UPDATE, $event);
|
$this->trigger(UserEvent::EVENT_BEFORE_PROFILE_UPDATE, $event);
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Profile details have been updated'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Profile details have been updated'));
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_PROFILE_UPDATE, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_PROFILE_UPDATE, $event);
|
||||||
|
|
||||||
return $this->refresh();
|
return $this->refresh();
|
||||||
@ -230,10 +230,10 @@ class AdminController extends Controller
|
|||||||
$this->trigger(UserEvent::EVENT_BEFORE_CONFIRMATION, $event);
|
$this->trigger(UserEvent::EVENT_BEFORE_CONFIRMATION, $event);
|
||||||
|
|
||||||
if ($this->make(UserConfirmationService::class, [$user])->run()) {
|
if ($this->make(UserConfirmationService::class, [$user])->run()) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User has been confirmed'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'User has been confirmed'));
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_CONFIRMATION, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_CONFIRMATION, $event);
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->getSession()->setFlash('warning', Yii::t('user', 'Unable to confirm user. Please, try again.'));
|
Yii::$app->getSession()->setFlash('warning', Yii::t('usuario', 'Unable to confirm user. Please, try again.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->redirect(Url::previous('actions-redirect'));
|
return $this->redirect(Url::previous('actions-redirect'));
|
||||||
@ -242,7 +242,7 @@ class AdminController extends Controller
|
|||||||
public function actionDelete($id)
|
public function actionDelete($id)
|
||||||
{
|
{
|
||||||
if ($id === Yii::$app->user->getId()) {
|
if ($id === Yii::$app->user->getId()) {
|
||||||
Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'You cannot remove your own account'));
|
Yii::$app->getSession()->setFlash('danger', Yii::t('usuario', 'You cannot remove your own account'));
|
||||||
} else {
|
} else {
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = $this->userQuery->where(['id' => $id])->one();
|
$user = $this->userQuery->where(['id' => $id])->one();
|
||||||
@ -251,12 +251,12 @@ class AdminController extends Controller
|
|||||||
$this->trigger(ActiveRecord::EVENT_BEFORE_DELETE, $event);
|
$this->trigger(ActiveRecord::EVENT_BEFORE_DELETE, $event);
|
||||||
|
|
||||||
if ($user->delete()) {
|
if ($user->delete()) {
|
||||||
Yii::$app->getSession()->setFlash('success', \Yii::t('user', 'User has been deleted'));
|
Yii::$app->getSession()->setFlash('success', \Yii::t('usuario', 'User has been deleted'));
|
||||||
$this->trigger(ActiveRecord::EVENT_AFTER_DELETE, $event);
|
$this->trigger(ActiveRecord::EVENT_AFTER_DELETE, $event);
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->getSession()->setFlash(
|
Yii::$app->getSession()->setFlash(
|
||||||
'warning',
|
'warning',
|
||||||
Yii::t('user', 'Unable to delete user. Please, try again later.')
|
Yii::t('usuario', 'Unable to delete user. Please, try again later.')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ class AdminController extends Controller
|
|||||||
public function actionBlock($id)
|
public function actionBlock($id)
|
||||||
{
|
{
|
||||||
if ($id === Yii::$app->user->getId()) {
|
if ($id === Yii::$app->user->getId()) {
|
||||||
Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'You cannot remove your own account'));
|
Yii::$app->getSession()->setFlash('danger', Yii::t('usuario', 'You cannot remove your own account'));
|
||||||
} else {
|
} else {
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = $this->userQuery->where(['id' => $id])->one();
|
$user = $this->userQuery->where(['id' => $id])->one();
|
||||||
@ -275,9 +275,9 @@ class AdminController extends Controller
|
|||||||
$event = $this->make(UserEvent::class, [$user]);
|
$event = $this->make(UserEvent::class, [$user]);
|
||||||
|
|
||||||
if ($this->make(UserBlockService::class, [$user, $event, $this])->run()) {
|
if ($this->make(UserBlockService::class, [$user, $event, $this])->run()) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User block status has been updated.'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'User block status has been updated.'));
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'Unable to update block status.'));
|
Yii::$app->getSession()->setFlash('danger', Yii::t('usuario', 'Unable to update block status.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class RecoveryController extends Controller
|
|||||||
return $this->render(
|
return $this->render(
|
||||||
'/shared/message',
|
'/shared/message',
|
||||||
[
|
[
|
||||||
'title' => Yii::t('user', 'Recovery message sent'),
|
'title' => Yii::t('usuario', 'Recovery message sent'),
|
||||||
'module' => $this->module,
|
'module' => $this->module,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -136,13 +136,13 @@ class RecoveryController extends Controller
|
|||||||
if ($token === null || $token->getIsExpired() || $token->user === null) {
|
if ($token === null || $token->getIsExpired() || $token->user === null) {
|
||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'danger',
|
'danger',
|
||||||
Yii::t('user', 'Recovery link is invalid or expired. Please try requesting a new one.')
|
Yii::t('usuario', 'Recovery link is invalid or expired. Please try requesting a new one.')
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->render(
|
return $this->render(
|
||||||
'/shared/message',
|
'/shared/message',
|
||||||
[
|
[
|
||||||
'title' => Yii::t('user', 'Invalid or expired link'),
|
'title' => Yii::t('usuario', 'Invalid or expired link'),
|
||||||
'module' => $this->module,
|
'module' => $this->module,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -161,7 +161,7 @@ class RecoveryController extends Controller
|
|||||||
return $this->render(
|
return $this->render(
|
||||||
'/shared/message',
|
'/shared/message',
|
||||||
[
|
[
|
||||||
'title' => Yii::t('user', 'Password has been changed'),
|
'title' => Yii::t('usuario', 'Password has been changed'),
|
||||||
'module' => $this->module,
|
'module' => $this->module,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class RegistrationController extends Controller
|
|||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'info',
|
'info',
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Your account has been created and a message with further instructions has been sent to your email'
|
'Your account has been created and a message with further instructions has been sent to your email'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -117,7 +117,7 @@ class RegistrationController extends Controller
|
|||||||
return $this->render(
|
return $this->render(
|
||||||
'/shared/message',
|
'/shared/message',
|
||||||
[
|
[
|
||||||
'title' => Yii::t('user', 'Your account has been created'),
|
'title' => Yii::t('usuario', 'Your account has been created'),
|
||||||
'module' => $this->module,
|
'module' => $this->module,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -189,20 +189,20 @@ class RegistrationController extends Controller
|
|||||||
|
|
||||||
if ($this->make(AccountConfirmationService::class, [$code, $user, $userConfirmationService])->run()) {
|
if ($this->make(AccountConfirmationService::class, [$code, $user, $userConfirmationService])->run()) {
|
||||||
Yii::$app->user->login($user, $this->module->rememberLoginLifespan);
|
Yii::$app->user->login($user, $this->module->rememberLoginLifespan);
|
||||||
Yii::$app->session->setFlash('success', Yii::t('user', 'Thank you, registration is now complete.'));
|
Yii::$app->session->setFlash('success', Yii::t('usuario', 'Thank you, registration is now complete.'));
|
||||||
|
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_CONFIRMATION, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_CONFIRMATION, $event);
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'danger',
|
'danger',
|
||||||
Yii::t('user', 'The confirmation link is invalid or expired. Please try requesting a new one.')
|
Yii::t('usuario', 'The confirmation link is invalid or expired. Please try requesting a new one.')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render(
|
return $this->render(
|
||||||
'/shared/message',
|
'/shared/message',
|
||||||
[
|
[
|
||||||
'title' => Yii::t('user', 'Account confirmation'),
|
'title' => Yii::t('usuario', 'Account confirmation'),
|
||||||
'module' => $this->module,
|
'module' => $this->module,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@ -231,7 +231,7 @@ class RegistrationController extends Controller
|
|||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'info',
|
'info',
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'A message has been sent to your email address. '.
|
'A message has been sent to your email address. '.
|
||||||
'It contains a confirmation link that you must click to complete registration.'
|
'It contains a confirmation link that you must click to complete registration.'
|
||||||
)
|
)
|
||||||
@ -242,7 +242,7 @@ class RegistrationController extends Controller
|
|||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'danger',
|
'danger',
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'We couldn\'t re-send the mail to confirm your address. '.
|
'We couldn\'t re-send the mail to confirm your address. '.
|
||||||
'Please, verify is the correct email or if it has been confirmed already.'
|
'Please, verify is the correct email or if it has been confirmed already.'
|
||||||
)
|
)
|
||||||
@ -251,8 +251,8 @@ class RegistrationController extends Controller
|
|||||||
|
|
||||||
return $this->render('/shared/message', [
|
return $this->render('/shared/message', [
|
||||||
'title' => $success
|
'title' => $success
|
||||||
? Yii::t('user', 'A new confirmation link has been sent')
|
? Yii::t('usuario', 'A new confirmation link has been sent')
|
||||||
: Yii::t('user', 'Unable to send confirmation link'),
|
: Yii::t('usuario', 'Unable to send confirmation link'),
|
||||||
'module' => $this->module,
|
'module' => $this->module,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,7 +158,7 @@ class SecurityController extends Controller
|
|||||||
public function connect(AuthClientInterface $client)
|
public function connect(AuthClientInterface $client)
|
||||||
{
|
{
|
||||||
if (Yii::$app->user->isGuest) {
|
if (Yii::$app->user->isGuest) {
|
||||||
Yii::$app->session->setFlash('danger', Yii::t('user', 'Something went wrong'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Something went wrong'));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class SettingsController extends Controller
|
|||||||
if ($profile->load(Yii::$app->request->post())) {
|
if ($profile->load(Yii::$app->request->post())) {
|
||||||
$this->trigger(UserEvent::EVENT_BEFORE_PROFILE_UPDATE, $event);
|
$this->trigger(UserEvent::EVENT_BEFORE_PROFILE_UPDATE, $event);
|
||||||
if ($profile->save()) {
|
if ($profile->save()) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Your profile has been updated'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Your profile has been updated'));
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_PROFILE_UPDATE, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_PROFILE_UPDATE, $event);
|
||||||
|
|
||||||
return $this->refresh();
|
return $this->refresh();
|
||||||
@ -145,7 +145,7 @@ class SettingsController extends Controller
|
|||||||
$this->trigger(UserEvent::EVENT_BEFORE_ACCOUNT_UPDATE, $event);
|
$this->trigger(UserEvent::EVENT_BEFORE_ACCOUNT_UPDATE, $event);
|
||||||
|
|
||||||
if ($form->save()) {
|
if ($form->save()) {
|
||||||
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'Your account details have been updated'));
|
Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Your account details have been updated'));
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_ACCOUNT_UPDATE, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_ACCOUNT_UPDATE, $event);
|
||||||
|
|
||||||
return $this->refresh();
|
return $this->refresh();
|
||||||
@ -210,7 +210,7 @@ class SettingsController extends Controller
|
|||||||
public function actionDelete()
|
public function actionDelete()
|
||||||
{
|
{
|
||||||
if (!$this->module->allowAccountDelete) {
|
if (!$this->module->allowAccountDelete) {
|
||||||
throw new NotFoundHttpException(\Yii::t('user', 'Not found'));
|
throw new NotFoundHttpException(\Yii::t('usuario', 'Not found'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
@ -222,7 +222,7 @@ class SettingsController extends Controller
|
|||||||
$user->delete();
|
$user->delete();
|
||||||
$this->trigger(UserEvent::EVENT_AFTER_DELETE, $event);
|
$this->trigger(UserEvent::EVENT_AFTER_DELETE, $event);
|
||||||
|
|
||||||
Yii::$app->session->setFlash('info', Yii::t('user', 'Your account has been completely deleted'));
|
Yii::$app->session->setFlash('info', Yii::t('usuario', 'Your account has been completely deleted'));
|
||||||
|
|
||||||
return $this->goHome();
|
return $this->goHome();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,9 +65,9 @@ class LoginForm extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'login' => Yii::t('user', 'Login'),
|
'login' => Yii::t('usuario', 'Login'),
|
||||||
'password' => Yii::t('user', 'Password'),
|
'password' => Yii::t('usuario', 'Password'),
|
||||||
'rememberMe' => Yii::t('user', 'Remember me next time'),
|
'rememberMe' => Yii::t('usuario', 'Remember me next time'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class LoginForm extends Model
|
|||||||
if ($this->user === null ||
|
if ($this->user === null ||
|
||||||
!$this->securityHelper->validatePassword($this->password, $this->user->password_hash)
|
!$this->securityHelper->validatePassword($this->password, $this->user->password_hash)
|
||||||
) {
|
) {
|
||||||
$this->addError($attribute, Yii::t('user', 'Invalid login or password'));
|
$this->addError($attribute, Yii::t('usuario', 'Invalid login or password'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -96,10 +96,10 @@ class LoginForm extends Model
|
|||||||
$module = $this->getModule();
|
$module = $this->getModule();
|
||||||
$confirmationRequired = $module->enableEmailConfirmation && !$module->allowUnconfirmedEmailLogin;
|
$confirmationRequired = $module->enableEmailConfirmation && !$module->allowUnconfirmedEmailLogin;
|
||||||
if ($confirmationRequired && !$this->user->getIsConfirmed()) {
|
if ($confirmationRequired && !$this->user->getIsConfirmed()) {
|
||||||
$this->addError($attribute, Yii::t('user', 'You need to confirm your email address'));
|
$this->addError($attribute, Yii::t('usuario', 'You need to confirm your email address'));
|
||||||
}
|
}
|
||||||
if ($this->user->getIsBlocked()) {
|
if ($this->user->getIsBlocked()) {
|
||||||
$this->addError($attribute, Yii::t('user', 'Your account has been blocked'));
|
$this->addError($attribute, Yii::t('usuario', 'Your account has been blocked'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -52,8 +52,8 @@ class RecoveryForm extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email' => Yii::t('user', 'Email'),
|
'email' => Yii::t('usuario', 'Email'),
|
||||||
'password' => Yii::t('user', 'Password'),
|
'password' => Yii::t('usuario', 'Password'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class RegistrationForm extends Model
|
|||||||
'username',
|
'username',
|
||||||
'unique',
|
'unique',
|
||||||
'targetClass' => $user,
|
'targetClass' => $user,
|
||||||
'message' => Yii::t('user', 'This username has already been taken'),
|
'message' => Yii::t('usuario', 'This username has already been taken'),
|
||||||
],
|
],
|
||||||
// email rules
|
// email rules
|
||||||
'emailTrim' => ['email', 'filter', 'filter' => 'trim'],
|
'emailTrim' => ['email', 'filter', 'filter' => 'trim'],
|
||||||
@ -63,7 +63,7 @@ class RegistrationForm extends Model
|
|||||||
'email',
|
'email',
|
||||||
'unique',
|
'unique',
|
||||||
'targetClass' => $user,
|
'targetClass' => $user,
|
||||||
'message' => Yii::t('user', 'This email address has already been taken'),
|
'message' => Yii::t('usuario', 'This email address has already been taken'),
|
||||||
],
|
],
|
||||||
// password rules
|
// password rules
|
||||||
'passwordRequired' => ['password', 'required', 'skipOnEmpty' => $this->module->generatePasswords],
|
'passwordRequired' => ['password', 'required', 'skipOnEmpty' => $this->module->generatePasswords],
|
||||||
@ -77,9 +77,9 @@ class RegistrationForm extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email' => Yii::t('user', 'Email'),
|
'email' => Yii::t('usuario', 'Email'),
|
||||||
'username' => Yii::t('user', 'Username'),
|
'username' => Yii::t('usuario', 'Username'),
|
||||||
'password' => Yii::t('user', 'Password'),
|
'password' => Yii::t('usuario', 'Password'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class ResendForm extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email' => Yii::t('user', 'Email'),
|
'email' => Yii::t('usuario', 'Email'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class SettingsForm extends Model
|
|||||||
'current_password',
|
'current_password',
|
||||||
function ($attribute) {
|
function ($attribute) {
|
||||||
if (!$this->securityHelper->validatePassword($this->$attribute, $this->getUser()->password_hash)) {
|
if (!$this->securityHelper->validatePassword($this->$attribute, $this->getUser()->password_hash)) {
|
||||||
$this->addError($attribute, Yii::t('user', 'Current password is not valid'));
|
$this->addError($attribute, Yii::t('usuario', 'Current password is not valid'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -94,10 +94,10 @@ class SettingsForm extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email' => Yii::t('user', 'Email'),
|
'email' => Yii::t('usuario', 'Email'),
|
||||||
'username' => Yii::t('user', 'Username'),
|
'username' => Yii::t('usuario', 'Username'),
|
||||||
'new_password' => Yii::t('user', 'New password'),
|
'new_password' => Yii::t('usuario', 'New password'),
|
||||||
'current_password' => Yii::t('user', 'Current password'),
|
'current_password' => Yii::t('usuario', 'Current password'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -71,10 +71,10 @@ abstract class AbstractAuthItem extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => Yii::t('user', 'Name'),
|
'name' => Yii::t('usuario', 'Name'),
|
||||||
'description' => Yii::t('user', 'Description'),
|
'description' => Yii::t('usuario', 'Description'),
|
||||||
'children' => Yii::t('user', 'Children'),
|
'children' => Yii::t('usuario', 'Children'),
|
||||||
'rule' => Yii::t('user', 'Rule'),
|
'rule' => Yii::t('usuario', 'Rule'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ abstract class AbstractAuthItem extends Model
|
|||||||
'name',
|
'name',
|
||||||
function () {
|
function () {
|
||||||
if ($this->getAuthManager()->getItem($this->name) !== null) {
|
if ($this->getAuthManager()->getItem($this->name) !== null) {
|
||||||
$this->addError('name', Yii::t('user', 'Auth item with such name already exists'));
|
$this->addError('name', Yii::t('usuario', 'Auth item with such name already exists'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'when' => function () {
|
'when' => function () {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class Assignment extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'items' => Yii::t('user', 'Items'),
|
'items' => Yii::t('usuario', 'Items'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class Profile extends ActiveRecord
|
|||||||
'timezone',
|
'timezone',
|
||||||
function ($attribute) {
|
function ($attribute) {
|
||||||
if ($this->make(TimeZoneValidator::class, [$attribute])->validate()) {
|
if ($this->make(TimeZoneValidator::class, [$attribute])->validate()) {
|
||||||
$this->addError($attribute, Yii::t('user', 'Time zone is not valid'));
|
$this->addError($attribute, Yii::t('usuario', 'Time zone is not valid'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -94,13 +94,13 @@ class Profile extends ActiveRecord
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => Yii::t('user', 'Name'),
|
'name' => Yii::t('usuario', 'Name'),
|
||||||
'public_email' => Yii::t('user', 'Email (public)'),
|
'public_email' => Yii::t('usuario', 'Email (public)'),
|
||||||
'gravatar_email' => Yii::t('user', 'Gravatar email'),
|
'gravatar_email' => Yii::t('usuario', 'Gravatar email'),
|
||||||
'location' => Yii::t('user', 'Location'),
|
'location' => Yii::t('usuario', 'Location'),
|
||||||
'website' => Yii::t('user', 'Website'),
|
'website' => Yii::t('usuario', 'Website'),
|
||||||
'bio' => Yii::t('user', 'Bio'),
|
'bio' => Yii::t('usuario', 'Bio'),
|
||||||
'timezone' => Yii::t('user', 'Time zone'),
|
'timezone' => Yii::t('usuario', 'Time zone'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -114,13 +114,13 @@ class User extends ActiveRecord implements IdentityInterface
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'username' => Yii::t('user', 'Username'),
|
'username' => Yii::t('usuario', 'Username'),
|
||||||
'email' => Yii::t('user', 'Email'),
|
'email' => Yii::t('usuario', 'Email'),
|
||||||
'registration_ip' => Yii::t('user', 'Registration ip'),
|
'registration_ip' => Yii::t('usuario', 'Registration ip'),
|
||||||
'unconfirmed_email' => Yii::t('user', 'New email'),
|
'unconfirmed_email' => Yii::t('usuario', 'New email'),
|
||||||
'password' => Yii::t('user', 'Password'),
|
'password' => Yii::t('usuario', 'Password'),
|
||||||
'created_at' => Yii::t('user', 'Registration time'),
|
'created_at' => Yii::t('usuario', 'Registration time'),
|
||||||
'confirmed_at' => Yii::t('user', 'Confirmation time'),
|
'confirmed_at' => Yii::t('usuario', 'Confirmation time'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ class User extends ActiveRecord implements IdentityInterface
|
|||||||
'usernameUnique' => [
|
'usernameUnique' => [
|
||||||
'username',
|
'username',
|
||||||
'unique',
|
'unique',
|
||||||
'message' => Yii::t('user', 'This username has already been taken'),
|
'message' => Yii::t('usuario', 'This username has already been taken'),
|
||||||
],
|
],
|
||||||
|
|
||||||
// email rules
|
// email rules
|
||||||
@ -165,7 +165,7 @@ class User extends ActiveRecord implements IdentityInterface
|
|||||||
'emailUnique' => [
|
'emailUnique' => [
|
||||||
'email',
|
'email',
|
||||||
'unique',
|
'unique',
|
||||||
'message' => Yii::t('user', 'This email address has already been taken'),
|
'message' => Yii::t('usuario', 'This email address has already been taken'),
|
||||||
],
|
],
|
||||||
'emailTrim' => ['email', 'trim'],
|
'emailTrim' => ['email', 'trim'],
|
||||||
|
|
||||||
|
|||||||
@ -68,10 +68,10 @@ class UserSearch extends Model
|
|||||||
public function attributeLabels()
|
public function attributeLabels()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'username' => Yii::t('user', 'Username'),
|
'username' => Yii::t('usuario', 'Username'),
|
||||||
'email' => Yii::t('user', 'Email'),
|
'email' => Yii::t('usuario', 'Email'),
|
||||||
'created_at' => Yii::t('user', 'Registration time'),
|
'created_at' => Yii::t('usuario', 'Registration time'),
|
||||||
'registration_ip' => Yii::t('user', 'Registration ip'),
|
'registration_ip' => Yii::t('usuario', 'Registration ip'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,13 +38,13 @@ class EmailChangeService implements ServiceInterface
|
|||||||
->one();
|
->one();
|
||||||
|
|
||||||
if ($token === null || $token->getIsExpired()) {
|
if ($token === null || $token->getIsExpired()) {
|
||||||
Yii::$app->session->setFlash('danger', Yii::t('user', 'Your confirmation token is invalid or expired'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Your confirmation token is invalid or expired'));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$token->delete();
|
$token->delete();
|
||||||
if (empty($this->model->unconfirmed_email)) {
|
if (empty($this->model->unconfirmed_email)) {
|
||||||
Yii::$app->session->setFlash('danger', Yii::t('user', 'An error occurred processing your request'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'An error occurred processing your request'));
|
||||||
} elseif ($this->userQuery->whereEmail($this->model->unconfirmed_email)->exists() === false) {
|
} elseif ($this->userQuery->whereEmail($this->model->unconfirmed_email)->exists() === false) {
|
||||||
if ($this->getModule()->emailChangeStrategy === MailChangeStrategyInterface::TYPE_SECURE) {
|
if ($this->getModule()->emailChangeStrategy === MailChangeStrategyInterface::TYPE_SECURE) {
|
||||||
if ($token->type === Token::TYPE_CONFIRM_NEW_EMAIL) {
|
if ($token->type === Token::TYPE_CONFIRM_NEW_EMAIL) {
|
||||||
@ -52,7 +52,7 @@ class EmailChangeService implements ServiceInterface
|
|||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'success',
|
'success',
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Awesome, almost there. '.
|
'Awesome, almost there. '.
|
||||||
'Now you need to click the confirmation link sent to your old email address.'
|
'Now you need to click the confirmation link sent to your old email address.'
|
||||||
)
|
)
|
||||||
@ -62,7 +62,7 @@ class EmailChangeService implements ServiceInterface
|
|||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'success',
|
'success',
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Awesome, almost there. '.
|
'Awesome, almost there. '.
|
||||||
'Now you need to click the confirmation link sent to your new email address.'
|
'Now you need to click the confirmation link sent to your new email address.'
|
||||||
)
|
)
|
||||||
@ -74,7 +74,7 @@ class EmailChangeService implements ServiceInterface
|
|||||||
) {
|
) {
|
||||||
$this->model->email = $this->model->unconfirmed_email;
|
$this->model->email = $this->model->unconfirmed_email;
|
||||||
$this->model->unconfirmed_email = null;
|
$this->model->unconfirmed_email = null;
|
||||||
Yii::$app->session->setFlash('success', Yii::t('user', 'Your email address has been changed'));
|
Yii::$app->session->setFlash('success', Yii::t('usuario', 'Your email address has been changed'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->model->save(false);
|
return $this->model->save(false);
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class PasswordRecoveryService implements ServiceInterface
|
|||||||
|
|
||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'info',
|
'info',
|
||||||
Yii::t('user', 'An email has been sent with instructions for resetting your password')
|
Yii::t('usuario', 'An email has been sent with instructions for resetting your password')
|
||||||
);
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -58,14 +58,14 @@ class SocialNetworkAccountConnectService implements ServiceInterface
|
|||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = Yii::$app->user->identity;
|
$user = Yii::$app->user->identity;
|
||||||
$account->link('user', $user);
|
$account->link('user', $user);
|
||||||
Yii::$app->session->setFlash('success', Yii::t('user', 'Your account has been connected'));
|
Yii::$app->session->setFlash('success', Yii::t('usuario', 'Your account has been connected'));
|
||||||
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_AFTER_CONNECT, $event);
|
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_AFTER_CONNECT, $event);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->session->setFlash(
|
Yii::$app->session->setFlash(
|
||||||
'danger',
|
'danger',
|
||||||
Yii::t('user', 'This account has already been connected to another user')
|
Yii::t('usuario', 'This account has already been connected to another user')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
|
|||||||
{
|
{
|
||||||
$account = $this->socialNetworkAccountQuery->whereClient($this->client)->one();
|
$account = $this->socialNetworkAccountQuery->whereClient($this->client)->one();
|
||||||
if (!$this->controller->module->enableRegistration && ($account === null || $account->user === null)) {
|
if (!$this->controller->module->enableRegistration && ($account === null || $account->user === null)) {
|
||||||
Yii::$app->session->setFlash('danger', Yii::t('user', 'Registration on this website is disabled'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Registration on this website is disabled'));
|
||||||
$this->authAction->setSuccessUrl(Url::to(['/usr/security/login']));
|
$this->authAction->setSuccessUrl(Url::to(['/usr/security/login']));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -58,7 +58,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
|
|||||||
if ($account === null) {
|
if ($account === null) {
|
||||||
$account = $this->createAccount();
|
$account = $this->createAccount();
|
||||||
if (!$account) {
|
if (!$account) {
|
||||||
Yii::$app->session->setFlash('danger', Yii::t('user', 'Unable to create an account.'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Unable to create an account.'));
|
||||||
$this->authAction->setSuccessUrl(Url::to(['/usr/security/login']));
|
$this->authAction->setSuccessUrl(Url::to(['/usr/security/login']));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -69,7 +69,7 @@ class SocialNetworkAuthenticateService implements ServiceInterface
|
|||||||
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_BEFORE_AUTHENTICATE, $event);
|
$this->controller->trigger(SocialNetworkAuthEvent::EVENT_BEFORE_AUTHENTICATE, $event);
|
||||||
if ($account->user instanceof User) {
|
if ($account->user instanceof User) {
|
||||||
if ($account->user->getIsBlocked()) {
|
if ($account->user->getIsBlocked()) {
|
||||||
Yii::$app->session->setFlash('danger', Yii::t('user', 'Your account has been blocked.'));
|
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'Your account has been blocked.'));
|
||||||
$this->authAction->setSuccessUrl(Url::to(['/user/security/login']));
|
$this->authAction->setSuccessUrl(Url::to(['/user/security/login']));
|
||||||
} else {
|
} else {
|
||||||
Yii::$app->user->login($account->user, $this->controller->module->rememberLoginLifeSpan);
|
Yii::$app->user->login($account->user, $this->controller->module->rememberLoginLifeSpan);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class DefaultEmailChangeStrategy implements MailChangeStrategyInterface
|
|||||||
if ($mailService->run()) {
|
if ($mailService->run()) {
|
||||||
Yii::$app
|
Yii::$app
|
||||||
->session
|
->session
|
||||||
->setFlash('info', Yii::t('user', 'A confirmation message has been sent to your new email address'));
|
->setFlash('info', Yii::t('usuario', 'A confirmation message has been sent to your new email address'));
|
||||||
|
|
||||||
return $this->form->getUser()->save();
|
return $this->form->getUser()->save();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class SecureEmailChangeStrategy implements MailChangeStrategyInterface
|
|||||||
->setFlash(
|
->setFlash(
|
||||||
'info',
|
'info',
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'We have sent confirmation links to both old and new email addresses. '.
|
'We have sent confirmation links to both old and new email addresses. '.
|
||||||
'You must click both links to complete your request.'
|
'You must click both links to complete your request.'
|
||||||
)
|
)
|
||||||
|
|||||||
@ -22,12 +22,12 @@ class RbacItemsValidator extends Validator
|
|||||||
protected function validateValue($value)
|
protected function validateValue($value)
|
||||||
{
|
{
|
||||||
if (!is_array($value)) {
|
if (!is_array($value)) {
|
||||||
return [Yii::t('item', 'Invalid value'), []];
|
return [Yii::t('usuario', 'Invalid value'), []];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($value as $item) {
|
foreach ($value as $item) {
|
||||||
if ($this->getAuthManager()->getItem($item) == null) {
|
if ($this->getAuthManager()->getItem($item) == null) {
|
||||||
return [Yii::t('user', 'There is neither role nor permission with name "{0}"', [$item]), []];
|
return [Yii::t('usuario', 'There is neither role nor permission with name "{0}"', [$item]), []];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,14 +23,14 @@ class RbacRuleValidator extends Validator
|
|||||||
try {
|
try {
|
||||||
$class = new ReflectionClass($value);
|
$class = new ReflectionClass($value);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return [Yii::t('user', 'Class "{0}" does not exist', $value), []];
|
return [Yii::t('usuario', 'Class "{0}" does not exist', $value), []];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($class->isInstantiable() == false) {
|
if ($class->isInstantiable() == false) {
|
||||||
return [Yii::t('user', 'Rule class can not be instantiated'), []];
|
return [Yii::t('usuario', 'Rule class can not be instantiated'), []];
|
||||||
}
|
}
|
||||||
if ($class->isSubclassOf('\yii\rbac\Rule') == false) {
|
if ($class->isSubclassOf('\yii\rbac\Rule') == false) {
|
||||||
return [Yii::t('user', 'Rule class must extend "yii\rbac\Rule"'), []];
|
return [Yii::t('usuario', 'Rule class must extend "yii\rbac\Rule"'), []];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'sourcePath' => __DIR__.'/../User',
|
'sourcePath' => __DIR__ . '/../../../User',
|
||||||
'messagePath' => __DIR__,
|
'messagePath' => __DIR__,
|
||||||
'languages' => [
|
'languages' => [
|
||||||
'ca',
|
'ca',
|
||||||
@ -24,7 +24,7 @@ return [
|
|||||||
'hr',
|
'hr',
|
||||||
'hu',
|
'hu',
|
||||||
'it',
|
'it',
|
||||||
'kz',
|
'kk',
|
||||||
'lt',
|
'lt',
|
||||||
'nl',
|
'nl',
|
||||||
'pl',
|
'pl',
|
||||||
|
|||||||
@ -37,7 +37,7 @@ use yii\helpers\Html;
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-3 col-lg-9">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ use Da\User\Widget\AssignmentsWidget;
|
|||||||
'options' => [
|
'options' => [
|
||||||
'class' => 'alert-info alert-dismissible',
|
'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">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><?= Yii::t('user', 'Registration time') ?>:</strong></td>
|
<td><strong><?= Yii::t('usuario', 'Registration time') ?>:</strong></td>
|
||||||
<td><?= Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$user->created_at]) ?></td>
|
<td><?= Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$user->created_at]) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($user->registration_ip !== null): ?>
|
<?php if ($user->registration_ip !== null): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><?= Yii::t('user', 'Registration IP') ?>:</strong></td>
|
<td><strong><?= Yii::t('usuario', 'Registration IP') ?>:</strong></td>
|
||||||
<td><?= $user->registration_ip ?></td>
|
<td><?= $user->registration_ip ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><?= Yii::t('user', 'Confirmation status') ?>:</strong></td>
|
<td><strong><?= Yii::t('usuario', 'Confirmation status') ?>:</strong></td>
|
||||||
<?php if ($user->isConfirmed): ?>
|
<?php if ($user->isConfirmed): ?>
|
||||||
<td class="text-success"><?= Yii::t(
|
<td class="text-success"><?= Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Confirmed at {0, date, MMMM dd, YYYY HH:mm}',
|
'Confirmed at {0, date, MMMM dd, YYYY HH:mm}',
|
||||||
[$user->confirmed_at]
|
[$user->confirmed_at]
|
||||||
) ?></td>
|
) ?></td>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<td class="text-danger"><?= Yii::t('user', 'Unconfirmed') ?></td>
|
<td class="text-danger"><?= Yii::t('usuario', 'Unconfirmed') ?></td>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong><?= Yii::t('user', 'Block status') ?>:</strong></td>
|
<td><strong><?= Yii::t('usuario', 'Block status') ?>:</strong></td>
|
||||||
<?php if ($user->isBlocked): ?>
|
<?php if ($user->isBlocked): ?>
|
||||||
<td class="text-danger"><?= Yii::t(
|
<td class="text-danger"><?= Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Blocked at {0, date, MMMM dd, YYYY HH:mm}',
|
'Blocked at {0, date, MMMM dd, YYYY HH:mm}',
|
||||||
[$user->blocked_at]
|
[$user->blocked_at]
|
||||||
) ?>
|
) ?>
|
||||||
</td>
|
</td>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<td class="text-success"><?= Yii::t('user', 'Not blocked') ?></td>
|
<td class="text-success"><?= Yii::t('usuario', 'Not blocked') ?></td>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ use yii\helpers\Html;
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-3 col-lg-9">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,8 @@ use yii\helpers\Html;
|
|||||||
* @var \Da\User\Model\User $user
|
* @var \Da\User\Model\User $user
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Create a user account');
|
$this->title = Yii::t('usuario', 'Create a user account');
|
||||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
|
$this->params['breadcrumbs'][] = ['label' => Yii::t('usuario', 'Users'), 'url' => ['index']];
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -50,18 +50,18 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
],
|
],
|
||||||
'items' => [
|
'items' => [
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Account details'),
|
'label' => Yii::t('usuario', 'Account details'),
|
||||||
'url' => ['/user/admin/create'],
|
'url' => ['/user/admin/create'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Profile details'),
|
'label' => Yii::t('usuario', 'Profile details'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'class' => 'disabled',
|
'class' => 'disabled',
|
||||||
'onclick' => 'return false;',
|
'onclick' => 'return false;',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Information'),
|
'label' => Yii::t('usuario', 'Information'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'class' => 'disabled',
|
'class' => 'disabled',
|
||||||
'onclick' => 'return false;',
|
'onclick' => 'return false;',
|
||||||
@ -77,8 +77,8 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<?= Yii::t('user', 'Credentials will be sent to the user by email') ?>.
|
<?= Yii::t('usuario', 'Credentials will be sent to the user by email') ?>.
|
||||||
<?= Yii::t('user', 'A password will be generated automatically if not provided') ?>.
|
<?= Yii::t('usuario', 'A password will be generated automatically if not provided') ?>.
|
||||||
</div>
|
</div>
|
||||||
<?php $form = ActiveForm::begin(
|
<?php $form = ActiveForm::begin(
|
||||||
[
|
[
|
||||||
@ -98,7 +98,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-3 col-lg-9">
|
<div class="col-lg-offset-3 col-lg-9">
|
||||||
<?= Html::submitButton(
|
<?= Html::submitButton(
|
||||||
Yii::t('user', 'Save'),
|
Yii::t('usuario', 'Save'),
|
||||||
['class' => 'btn btn-block btn-success']
|
['class' => 'btn btn-block btn-success']
|
||||||
) ?>
|
) ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -20,7 +20,7 @@ use yii\widgets\Pjax;
|
|||||||
* @var $searchModel Da\User\Search\UserSearch
|
* @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;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'attribute' => 'registration_ip',
|
'attribute' => 'registration_ip',
|
||||||
'value' => function ($model) {
|
'value' => function ($model) {
|
||||||
return $model->registration_ip == null
|
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;
|
: $model->registration_ip;
|
||||||
},
|
},
|
||||||
'format' => 'html',
|
'format' => 'html',
|
||||||
@ -49,27 +49,27 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'attribute' => 'created_at',
|
'attribute' => 'created_at',
|
||||||
'value' => function ($model) {
|
'value' => function ($model) {
|
||||||
if (extension_loaded('intl')) {
|
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 {
|
} else {
|
||||||
return date('Y-m-d G:i:s', $model->created_at);
|
return date('Y-m-d G:i:s', $model->created_at);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'header' => Yii::t('user', 'Confirmation'),
|
'header' => Yii::t('usuario', 'Confirmation'),
|
||||||
'value' => function ($model) {
|
'value' => function ($model) {
|
||||||
if ($model->isConfirmed) {
|
if ($model->isConfirmed) {
|
||||||
return '<div class="text-center">
|
return '<div class="text-center">
|
||||||
<span class="text-success">' .Yii::t('user', 'Confirmed').'</span>
|
<span class="text-success">' .Yii::t('usuario', 'Confirmed').'</span>
|
||||||
</div>';
|
</div>';
|
||||||
} else {
|
} else {
|
||||||
return Html::a(
|
return Html::a(
|
||||||
Yii::t('user', 'Confirm'),
|
Yii::t('usuario', 'Confirm'),
|
||||||
['confirm', 'id' => $model->id],
|
['confirm', 'id' => $model->id],
|
||||||
[
|
[
|
||||||
'class' => 'btn btn-xs btn-success btn-block',
|
'class' => 'btn btn-xs btn-success btn-block',
|
||||||
'data-method' => 'post',
|
'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,
|
'visible' => Yii::$app->getModule('user')->enableEmailConfirmation,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'header' => Yii::t('user', 'Block status'),
|
'header' => Yii::t('usuario', 'Block status'),
|
||||||
'value' => function ($model) {
|
'value' => function ($model) {
|
||||||
if ($model->isBlocked) {
|
if ($model->isBlocked) {
|
||||||
return Html::a(
|
return Html::a(
|
||||||
Yii::t('user', 'Unblock'),
|
Yii::t('usuario', 'Unblock'),
|
||||||
['block', 'id' => $model->id],
|
['block', 'id' => $model->id],
|
||||||
[
|
[
|
||||||
'class' => 'btn btn-xs btn-success btn-block',
|
'class' => 'btn btn-xs btn-success btn-block',
|
||||||
'data-method' => 'post',
|
'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 {
|
} else {
|
||||||
return Html::a(
|
return Html::a(
|
||||||
Yii::t('user', 'Block'),
|
Yii::t('usuario', 'Block'),
|
||||||
['block', 'id' => $model->id],
|
['block', 'id' => $model->id],
|
||||||
[
|
[
|
||||||
'class' => 'btn btn-xs btn-danger btn-block',
|
'class' => 'btn btn-xs btn-danger btn-block',
|
||||||
'data-method' => 'post',
|
'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
|
* @var string $content
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Update user account');
|
$this->title = Yii::t('usuario', 'Update user account');
|
||||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Users'), 'url' => ['index']];
|
$this->params['breadcrumbs'][] = ['label' => Yii::t('usuario', 'Users'), 'url' => ['index']];
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -52,69 +52,69 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
],
|
],
|
||||||
'items' => [
|
'items' => [
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Account details'),
|
'label' => Yii::t('usuario', 'Account details'),
|
||||||
'url' => ['/user/admin/update', 'id' => $user->id],
|
'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],
|
'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],
|
'url' => ['/user/admin/info', 'id' => $user->id],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Assignments'),
|
'label' => Yii::t('usuario', 'Assignments'),
|
||||||
'url' => ['/user/admin/assignments', 'id' => $user->id],
|
'url' => ['/user/admin/assignments', 'id' => $user->id],
|
||||||
],
|
],
|
||||||
'<hr>',
|
'<hr>',
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Confirm'),
|
'label' => Yii::t('usuario', 'Confirm'),
|
||||||
'url' => ['/user/admin/confirm', 'id' => $user->id],
|
'url' => ['/user/admin/confirm', 'id' => $user->id],
|
||||||
'visible' => !$user->isConfirmed,
|
'visible' => !$user->isConfirmed,
|
||||||
'linkOptions' => [
|
'linkOptions' => [
|
||||||
'class' => 'text-success',
|
'class' => 'text-success',
|
||||||
'data-method' => 'post',
|
'data-method' => 'post',
|
||||||
'data-confirm' => Yii::t(
|
'data-confirm' => Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Are you sure you want to confirm this user?'
|
'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],
|
'url' => ['/user/admin/block', 'id' => $user->id],
|
||||||
'visible' => !$user->isBlocked,
|
'visible' => !$user->isBlocked,
|
||||||
'linkOptions' => [
|
'linkOptions' => [
|
||||||
'class' => 'text-danger',
|
'class' => 'text-danger',
|
||||||
'data-method' => 'post',
|
'data-method' => 'post',
|
||||||
'data-confirm' => Yii::t(
|
'data-confirm' => Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Are you sure you want to block this user?'
|
'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],
|
'url' => ['/user/admin/block', 'id' => $user->id],
|
||||||
'visible' => $user->isBlocked,
|
'visible' => $user->isBlocked,
|
||||||
'linkOptions' => [
|
'linkOptions' => [
|
||||||
'class' => 'text-success',
|
'class' => 'text-success',
|
||||||
'data-method' => 'post',
|
'data-method' => 'post',
|
||||||
'data-confirm' => Yii::t(
|
'data-confirm' => Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Are you sure you want to unblock this user?'
|
'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],
|
'url' => ['/user/admin/delete', 'id' => $user->id],
|
||||||
'linkOptions' => [
|
'linkOptions' => [
|
||||||
'class' => 'text-danger',
|
'class' => 'text-danger',
|
||||||
'data-method' => 'post',
|
'data-method' => 'post',
|
||||||
'data-confirm' => Yii::t(
|
'data-confirm' => Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'Are you sure you want to delete this user?'
|
'Are you sure you want to delete this user?'
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -17,18 +17,18 @@ use yii\helpers\Html;
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'Thank you for signing up on {0}', Yii::$app->name) ?>.
|
<?= Yii::t('usuario', 'Thank you for signing up on {0}', Yii::$app->name) ?>.
|
||||||
<?= Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
|
<?= Yii::t('usuario', 'In order to complete your registration, please click the link below') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Html::a(Html::encode($token->url), $token->url) ?>
|
<?= Html::a(Html::encode($token->url), $token->url) ?>
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -16,22 +16,22 @@ use yii\helpers\Html;
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t(
|
<?= Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'We have received a request to change the email address for your account on {0}',
|
'We have received a request to change the email address for your account on {0}',
|
||||||
Yii::$app->name
|
Yii::$app->name
|
||||||
) ?>.
|
) ?>.
|
||||||
<?= Yii::t('user', 'In order to complete your request, please click the link below') ?>.
|
<?= Yii::t('usuario', 'In order to complete your request, please click the link below') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Html::a(Html::encode($token->getUrl()), $token->getUrl()); ?>
|
<?= Html::a(Html::encode($token->getUrl()), $token->getUrl()); ?>
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -17,18 +17,18 @@ use yii\helpers\Html;
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'We have received a request to reset the password for your account on {0}', Yii::$app->name) ?>.
|
<?= Yii::t('usuario', 'We have received a request to reset the password for your account on {0}', Yii::$app->name) ?>.
|
||||||
<?= Yii::t('user', 'Please click the link below to complete your password reset') ?>.
|
<?= Yii::t('usuario', 'Please click the link below to complete your password reset') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Html::a(Html::encode($token->url), $token->url); ?>
|
<?= Html::a(Html::encode($token->url), $token->url); ?>
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -14,13 +14,13 @@
|
|||||||
* @var \Da\User\Model\Token $token
|
* @var \Da\User\Model\Token $token
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
|
|
||||||
<?= Yii::t('user', 'Thank you for signing up on {0}', Yii::$app->name) ?>.
|
<?= Yii::t('usuario', 'Thank you for signing up on {0}', Yii::$app->name) ?>.
|
||||||
<?= Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
|
<?= Yii::t('usuario', 'In order to complete your registration, please click the link below') ?>.
|
||||||
|
|
||||||
<?= $token->url ?>
|
<?= $token->url ?>
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
|
|||||||
@ -13,17 +13,17 @@
|
|||||||
* @var \Da\User\Model\Token
|
* @var \Da\User\Model\Token
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
|
|
||||||
<?= Yii::t(
|
<?= Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'We have received a request to change the email address for your account on {0}',
|
'We have received a request to change the email address for your account on {0}',
|
||||||
Yii::$app->name
|
Yii::$app->name
|
||||||
) ?>.
|
) ?>.
|
||||||
<?= Yii::t('user', 'In order to complete your request, please click the link below') ?>.
|
<?= Yii::t('usuario', 'In order to complete your request, please click the link below') ?>.
|
||||||
|
|
||||||
<?= $token->url ?>
|
<?= $token->url ?>
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
|
|||||||
@ -14,13 +14,13 @@
|
|||||||
* @var \Da\User\Model\Token $token
|
* @var \Da\User\Model\Token $token
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
|
|
||||||
<?= Yii::t('user', 'We have received a request to reset the password for your account on {0}', Yii::$app->name) ?>.
|
<?= Yii::t('usuario', 'We have received a request to reset the password for your account on {0}', Yii::$app->name) ?>.
|
||||||
<?= Yii::t('user', 'Please click the link below to complete your password reset') ?>.
|
<?= Yii::t('usuario', 'Please click the link below to complete your password reset') ?>.
|
||||||
|
|
||||||
<?= $token->url ?>
|
<?= $token->url ?>
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
|
|||||||
@ -15,18 +15,18 @@
|
|||||||
* @var \Da\User\Module $module
|
* @var \Da\User\Module $module
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
|
|
||||||
<?= Yii::t('user', 'Your account on {0} has been created', Yii::$app->name) ?>.
|
<?= Yii::t('usuario', 'Your account on {0} has been created', Yii::$app->name) ?>.
|
||||||
<?php if ($module->generatePasswords): ?>
|
<?php if ($module->generatePasswords): ?>
|
||||||
<?= Yii::t('user', 'We have generated a password for you') ?>:
|
<?= Yii::t('usuario', 'We have generated a password for you') ?>:
|
||||||
<?= $user->password ?>
|
<?= $user->password ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?php if ($token !== null): ?>
|
<?php if ($token !== null): ?>
|
||||||
<?= Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
|
<?= Yii::t('usuario', 'In order to complete your registration, please click the link below') ?>.
|
||||||
<?= $token->url ?>
|
<?= $token->url ?>
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
|
|||||||
@ -20,29 +20,29 @@ use yii\helpers\Html;
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'Hello') ?>,
|
<?= Yii::t('usuario', 'Hello') ?>,
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'Your account on {0} has been created', Yii::$app->name) ?>.
|
<?= Yii::t('usuario', 'Your account on {0} has been created', Yii::$app->name) ?>.
|
||||||
<?php if ($showPassword || $module->generatePasswords): ?>
|
<?php if ($showPassword || $module->generatePasswords): ?>
|
||||||
<?= Yii::t('user', 'We have generated a password for you') ?>: <strong><?= $user->password ?></strong>
|
<?= Yii::t('usuario', 'We have generated a password for you') ?>: <strong><?= $user->password ?></strong>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php if ($token !== null): ?>
|
<?php if ($token !== null): ?>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'In order to complete your registration, please click the link below') ?>.
|
<?= Yii::t('usuario', 'In order to complete your registration, please click the link below') ?>.
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Html::a(Html::encode($token->url), $token->url); ?>
|
<?= Html::a(Html::encode($token->url), $token->url); ?>
|
||||||
</p>
|
</p>
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
<?= Yii::t('usuario', 'If you cannot click the link, please try pasting the text into your browser') ?>.
|
||||||
</p>
|
</p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
<p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;">
|
||||||
<?= Yii::t('user', 'If you did not make this request you can ignore this email') ?>.
|
<?= Yii::t('usuario', 'If you did not make this request you can ignore this email') ?>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -40,6 +40,6 @@ use yii\widgets\ActiveForm;
|
|||||||
],
|
],
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end() ?>
|
<?php ActiveForm::end() ?>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
* @var $unassignedItems string[]
|
* @var $unassignedItems string[]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Create new permission');
|
$this->title = Yii::t('usuario', 'Create new permission');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -18,7 +18,7 @@ use yii\grid\ActionColumn;
|
|||||||
use yii\grid\GridView;
|
use yii\grid\GridView;
|
||||||
use yii\helpers\Url;
|
use yii\helpers\Url;
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Permissions');
|
$this->title = Yii::t('usuario', 'Permissions');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -33,21 +33,21 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'columns' => [
|
'columns' => [
|
||||||
[
|
[
|
||||||
'attribute' => 'name',
|
'attribute' => 'name',
|
||||||
'header' => Yii::t('user', 'Name'),
|
'header' => Yii::t('usuario', 'Name'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'style' => 'width: 20%',
|
'style' => 'width: 20%',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'description',
|
'attribute' => 'description',
|
||||||
'header' => Yii::t('user', 'Description'),
|
'header' => Yii::t('usuario', 'Description'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'style' => 'width: 55%',
|
'style' => 'width: 55%',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'rule_name',
|
'attribute' => 'rule_name',
|
||||||
'header' => Yii::t('user', 'Rule name'),
|
'header' => Yii::t('usuario', 'Rule name'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'style' => 'width: 20%',
|
'style' => 'width: 20%',
|
||||||
],
|
],
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
* @var $unassignedItems string[]
|
* @var $unassignedItems string[]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Update permission');
|
$this->title = Yii::t('usuario', 'Update permission');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -53,7 +53,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li>
|
<li>
|
||||||
<i class="glyphicon glyphicon-time text-muted"></i>
|
<i class="glyphicon glyphicon-time text-muted"></i>
|
||||||
<?= Yii::t('user', 'Joined on {0, date}', $profile->user->created_at) ?>
|
<?= Yii::t('usuario', 'Joined on {0, date}', $profile->user->created_at) ?>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php if (!empty($profile->bio)): ?>
|
<?php if (!empty($profile->bio)): ?>
|
||||||
|
|||||||
@ -18,7 +18,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Form\RecoveryForm $model
|
* @var \Da\User\Form\RecoveryForm $model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Recover your password');
|
$this->title = Yii::t('usuario', 'Recover your password');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -38,7 +38,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
<?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
|
<?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Continue'), ['class' => 'btn btn-primary btn-block']) ?><br>
|
<?= Html::submitButton(Yii::t('usuario', 'Continue'), ['class' => 'btn btn-primary btn-block']) ?><br>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -18,7 +18,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Form\RecoveryForm $model
|
* @var \Da\User\Form\RecoveryForm $model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Reset your password');
|
$this->title = Yii::t('usuario', 'Reset your password');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -38,7 +38,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
<?= $form->field($model, 'password')->passwordInput() ?>
|
<?= $form->field($model, 'password')->passwordInput() ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Finish'), ['class' => 'btn btn-success btn-block']) ?><br>
|
<?= Html::submitButton(Yii::t('usuario', 'Finish'), ['class' => 'btn btn-success btn-block']) ?><br>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Model\SocialNetworkAccount $account
|
* @var \Da\User\Model\SocialNetworkAccount $account
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Sign in');
|
$this->title = Yii::t('usuario', 'Sign in');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -32,7 +32,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<p>
|
<p>
|
||||||
<?= Yii::t(
|
<?= Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'In order to finish your registration, we need you to enter following fields'
|
'In order to finish your registration, we need you to enter following fields'
|
||||||
) ?>:
|
) ?>:
|
||||||
</p>
|
</p>
|
||||||
@ -47,7 +47,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
<?= $form->field($model, 'username') ?>
|
<?= $form->field($model, 'username') ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Continue'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Continue'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +55,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<?= Html::a(
|
<?= Html::a(
|
||||||
Yii::t(
|
Yii::t(
|
||||||
'user',
|
'usuario',
|
||||||
'If you already registered, sign in and connect this account on settings page'
|
'If you already registered, sign in and connect this account on settings page'
|
||||||
),
|
),
|
||||||
['/user/settings/networks']
|
['/user/settings/networks']
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Module $module
|
* @var \Da\User\Module $module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Sign up');
|
$this->title = Yii::t('usuario', 'Sign up');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -45,13 +45,13 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<?= $form->field($model, 'password')->passwordInput() ?>
|
<?= $form->field($model, 'password')->passwordInput() ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Sign up'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Sign up'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<?= Html::a(Yii::t('user', 'Already registered? Sign in!'), ['/user/security/login']) ?>
|
<?= Html::a(Yii::t('usuario', 'Already registered? Sign in!'), ['/user/security/login']) ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -17,7 +17,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Form\ResendForm $model
|
* @var \Da\User\Form\ResendForm $model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Request new confirmation message');
|
$this->title = Yii::t('usuario', 'Request new confirmation message');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
<?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
|
<?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Continue'), ['class' => 'btn btn-primary btn-block']) ?><br>
|
<?= Html::submitButton(Yii::t('usuario', 'Continue'), ['class' => 'btn btn-primary btn-block']) ?><br>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -43,6 +43,6 @@ $unassignedItems = Yii::$container->get(AuthHelper::class)->getUnassignedItems($
|
|||||||
],
|
],
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end() ?>
|
<?php ActiveForm::end() ?>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
* @var $this yii\web\View
|
* @var $this yii\web\View
|
||||||
* @var $unassignedItems string[]
|
* @var $unassignedItems string[]
|
||||||
*/
|
*/
|
||||||
$this->title = Yii::t('user', 'Create new role');
|
$this->title = Yii::t('usuario', 'Create new role');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use yii\helpers\Url;
|
|||||||
* @var $this yii\web\View
|
* @var $this yii\web\View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Roles');
|
$this->title = Yii::t('usuario', 'Roles');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -34,21 +34,21 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'columns' => [
|
'columns' => [
|
||||||
[
|
[
|
||||||
'attribute' => 'name',
|
'attribute' => 'name',
|
||||||
'header' => Yii::t('user', 'Name'),
|
'header' => Yii::t('usuario', 'Name'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'style' => 'width: 20%',
|
'style' => 'width: 20%',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'description',
|
'attribute' => 'description',
|
||||||
'header' => Yii::t('user', 'Description'),
|
'header' => Yii::t('usuario', 'Description'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'style' => 'width: 55%',
|
'style' => 'width: 55%',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'attribute' => 'rule_name',
|
'attribute' => 'rule_name',
|
||||||
'header' => Yii::t('user', 'Rule name'),
|
'header' => Yii::t('usuario', 'Rule name'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'style' => 'width: 20%',
|
'style' => 'width: 20%',
|
||||||
],
|
],
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
* @var $this yii\web\View
|
* @var $this yii\web\View
|
||||||
* @var $unassignedItems string[]
|
* @var $unassignedItems string[]
|
||||||
*/
|
*/
|
||||||
$this->title = Yii::t('user', 'Update role');
|
$this->title = Yii::t('usuario', 'Update role');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Module $module
|
* @var \Da\User\Module $module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Sign in');
|
$this->title = Yii::t('usuario', 'Sign in');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
)
|
)
|
||||||
->passwordInput()
|
->passwordInput()
|
||||||
->label(
|
->label(
|
||||||
Yii::t('user', 'Password')
|
Yii::t('usuario', 'Password')
|
||||||
.($module->allowPasswordRecovery ?
|
.($module->allowPasswordRecovery ?
|
||||||
' ('.Html::a(
|
' ('.Html::a(
|
||||||
Yii::t('user', 'Forgot password?'),
|
Yii::t('usuario', 'Forgot password?'),
|
||||||
['/user/recovery/request'],
|
['/user/recovery/request'],
|
||||||
['tabindex' => '5']
|
['tabindex' => '5']
|
||||||
)
|
)
|
||||||
@ -70,7 +70,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<?= $form->field($model, 'rememberMe')->checkbox(['tabindex' => '4']) ?>
|
<?= $form->field($model, 'rememberMe')->checkbox(['tabindex' => '4']) ?>
|
||||||
|
|
||||||
<?= Html::submitButton(
|
<?= Html::submitButton(
|
||||||
Yii::t('user', 'Sign in'),
|
Yii::t('usuario', 'Sign in'),
|
||||||
['class' => 'btn btn-primary btn-block', 'tabindex' => '3']
|
['class' => 'btn btn-primary btn-block', 'tabindex' => '3']
|
||||||
) ?>
|
) ?>
|
||||||
|
|
||||||
@ -79,12 +79,12 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
</div>
|
</div>
|
||||||
<?php if ($module->enableEmailConfirmation): ?>
|
<?php if ($module->enableEmailConfirmation): ?>
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<?= Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>
|
<?= Html::a(Yii::t('usuario', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($module->enableRegistration): ?>
|
<?php if ($module->enableRegistration): ?>
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<?= Html::a(Yii::t('user', 'Don\'t have an account? Sign up!'), ['/user/registration/register']) ?>
|
<?= Html::a(Yii::t('usuario', 'Don\'t have an account? Sign up!'), ['/user/registration/register']) ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?= ConnectWidget::widget(
|
<?= ConnectWidget::widget(
|
||||||
|
|||||||
@ -38,10 +38,10 @@ $networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
|
|||||||
'class' => 'nav nav-pills nav-stacked',
|
'class' => 'nav nav-pills nav-stacked',
|
||||||
],
|
],
|
||||||
'items' => [
|
'items' => [
|
||||||
['label' => Yii::t('user', 'Profile'), 'url' => ['/user/settings/profile']],
|
['label' => Yii::t('usuario', 'Profile'), 'url' => ['/user/settings/profile']],
|
||||||
['label' => Yii::t('user', 'Account'), 'url' => ['/user/settings/account']],
|
['label' => Yii::t('usuario', 'Account'), 'url' => ['/user/settings/account']],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Networks'),
|
'label' => Yii::t('usuario', 'Networks'),
|
||||||
'url' => ['/user/settings/networks'],
|
'url' => ['/user/settings/networks'],
|
||||||
'visible' => $networksVisible,
|
'visible' => $networksVisible,
|
||||||
],
|
],
|
||||||
|
|||||||
@ -18,7 +18,7 @@ use yii\widgets\ActiveForm;
|
|||||||
* @var \Da\User\Form\SettingsForm $model
|
* @var \Da\User\Form\SettingsForm $model
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Account settings');
|
$this->title = Yii::t('usuario', 'Account settings');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
@ -58,7 +58,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-3 col-lg-9">
|
<div class="col-lg-offset-3 col-lg-9">
|
||||||
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-block btn-success']) ?><br>
|
<?= Html::submitButton(Yii::t('usuario', 'Save'), ['class' => 'btn btn-block btn-success']) ?><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -69,18 +69,18 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<?php if ($model->module->allowAccountDelete): ?>
|
<?php if ($model->module->allowAccountDelete): ?>
|
||||||
<div class="panel panel-danger">
|
<div class="panel panel-danger">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title"><?= Yii::t('user', 'Delete account') ?></h3>
|
<h3 class="panel-title"><?= Yii::t('usuario', 'Delete account') ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<p>
|
<p>
|
||||||
<?= Yii::t('user', 'Once you delete your account, there is no going back') ?>.
|
<?= Yii::t('usuario', 'Once you delete your account, there is no going back') ?>.
|
||||||
<?= Yii::t('user', 'It will be deleted forever') ?>.
|
<?= Yii::t('usuario', 'It will be deleted forever') ?>.
|
||||||
<?= Yii::t('user', 'Please be certain') ?>.
|
<?= Yii::t('usuario', 'Please be certain') ?>.
|
||||||
</p>
|
</p>
|
||||||
<?= Html::a(Yii::t('user', 'Delete account'), ['delete'], [
|
<?= Html::a(Yii::t('usuario', 'Delete account'), ['delete'], [
|
||||||
'class' => 'btn btn-danger',
|
'class' => 'btn btn-danger',
|
||||||
'data-method' => 'post',
|
'data-method' => 'post',
|
||||||
'data-confirm' => Yii::t('user', 'Are you sure? There is no going back'),
|
'data-confirm' => Yii::t('usuario', 'Are you sure? There is no going back'),
|
||||||
]) ?>
|
]) ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -18,7 +18,7 @@ use yii\helpers\Html;
|
|||||||
* @var \Da\User\Model\User $user
|
* @var \Da\User\Model\User $user
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Networks');
|
$this->title = Yii::t('usuario', 'Networks');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<p><?= Yii::t('user', 'You can connect multiple accounts to be able to log in using them') ?>.</p>
|
<p><?= Yii::t('usuario', 'You can connect multiple accounts to be able to log in using them') ?>.</p>
|
||||||
</div>
|
</div>
|
||||||
<?php $auth = ConnectWidget::begin(
|
<?php $auth = ConnectWidget::begin(
|
||||||
[
|
[
|
||||||
@ -59,7 +59,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
<td style="width: 120px">
|
<td style="width: 120px">
|
||||||
<?= $auth->isConnected($client) ?
|
<?= $auth->isConnected($client) ?
|
||||||
Html::a(
|
Html::a(
|
||||||
Yii::t('user', 'Disconnect'),
|
Yii::t('usuario', 'Disconnect'),
|
||||||
$auth->createClientUrl($client),
|
$auth->createClientUrl($client),
|
||||||
[
|
[
|
||||||
'class' => 'btn btn-danger btn-block',
|
'class' => 'btn btn-danger btn-block',
|
||||||
@ -67,7 +67,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
]
|
]
|
||||||
) :
|
) :
|
||||||
Html::a(
|
Html::a(
|
||||||
Yii::t('user', 'Connect'),
|
Yii::t('usuario', 'Connect'),
|
||||||
$auth->createClientUrl($client),
|
$auth->createClientUrl($client),
|
||||||
[
|
[
|
||||||
'class' => 'btn btn-success btn-block',
|
'class' => 'btn btn-success btn-block',
|
||||||
|
|||||||
@ -21,7 +21,7 @@ use Da\User\Helper\TimezoneHelper;
|
|||||||
* @var TimezoneHelper $timezoneHelper
|
* @var TimezoneHelper $timezoneHelper
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->title = Yii::t('user', 'Profile settings');
|
$this->title = Yii::t('usuario', 'Profile settings');
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
$timezoneHelper = $model->make(TimezoneHelper::class);
|
$timezoneHelper = $model->make(TimezoneHelper::class);
|
||||||
?>
|
?>
|
||||||
@ -70,7 +70,7 @@ $timezoneHelper = $model->make(TimezoneHelper::class);
|
|||||||
->field($model, 'gravatar_email')
|
->field($model, 'gravatar_email')
|
||||||
->hint(
|
->hint(
|
||||||
Html::a(
|
Html::a(
|
||||||
Yii::t('user', 'Change your avatar at Gravatar.com'),
|
Yii::t('usuario', 'Change your avatar at Gravatar.com'),
|
||||||
'http://gravatar.com'
|
'http://gravatar.com'
|
||||||
)
|
)
|
||||||
) ?>
|
) ?>
|
||||||
@ -79,7 +79,7 @@ $timezoneHelper = $model->make(TimezoneHelper::class);
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-3 col-lg-9">
|
<div class="col-lg-offset-3 col-lg-9">
|
||||||
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-block btn-success']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Save'), ['class' => 'btn btn-block btn-success']) ?>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,30 +21,30 @@ use yii\bootstrap\Nav;
|
|||||||
],
|
],
|
||||||
'items' => [
|
'items' => [
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Users'),
|
'label' => Yii::t('usuario', 'Users'),
|
||||||
'url' => ['/user/admin/index'],
|
'url' => ['/user/admin/index'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Roles'),
|
'label' => Yii::t('usuario', 'Roles'),
|
||||||
'url' => ['/user/role/index'],
|
'url' => ['/user/role/index'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Permissions'),
|
'label' => Yii::t('usuario', 'Permissions'),
|
||||||
'url' => ['/user/permission/index'],
|
'url' => ['/user/permission/index'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'Create'),
|
'label' => Yii::t('usuario', 'Create'),
|
||||||
'items' => [
|
'items' => [
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'New user'),
|
'label' => Yii::t('usuario', 'New user'),
|
||||||
'url' => ['/user/admin/create'],
|
'url' => ['/user/admin/create'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'New role'),
|
'label' => Yii::t('usuario', 'New role'),
|
||||||
'url' => ['/user/role/create'],
|
'url' => ['/user/role/create'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => Yii::t('user', 'New permission'),
|
'label' => Yii::t('usuario', 'New permission'),
|
||||||
'url' => ['/user/permission/create'],
|
'url' => ['/user/permission/create'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
@ -28,7 +28,7 @@ use yii\widgets\ActiveForm;
|
|||||||
'options' => [
|
'options' => [
|
||||||
'class' => 'alert-success',
|
'class' => 'alert-success',
|
||||||
],
|
],
|
||||||
'body' => Yii::t('user', 'Assignments have been updated'),
|
'body' => Yii::t('usuario', 'Assignments have been updated'),
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
@ -48,6 +48,6 @@ use yii\widgets\ActiveForm;
|
|||||||
],
|
],
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Update assignments'), ['class' => 'btn btn-success btn-block']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Update assignments'), ['class' => 'btn btn-success btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end() ?>
|
<?php ActiveForm::end() ?>
|
||||||
|
|||||||
@ -39,11 +39,11 @@ use yii\helpers\Html;
|
|||||||
|
|
||||||
<?= $form->field($model, 'rememberMe')->checkbox() ?>
|
<?= $form->field($model, 'rememberMe')->checkbox() ?>
|
||||||
|
|
||||||
<?= Html::submitButton(Yii::t('user', 'Sign in'), ['class' => 'btn btn-primary btn-block']) ?>
|
<?= Html::submitButton(Yii::t('usuario', 'Sign in'), ['class' => 'btn btn-primary btn-block']) ?>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= Html::a(Yii::t('user', 'Logout'), ['/user/security/logout'], [
|
<?= Html::a(Yii::t('usuario', 'Logout'), ['/user/security/logout'], [
|
||||||
'class' => 'btn btn-danger btn-block',
|
'class' => 'btn btn-danger btn-block',
|
||||||
'data-method' => 'post',
|
'data-method' => 'post',
|
||||||
]) ?>
|
]) ?>
|
||||||
|
|||||||
@ -14,6 +14,18 @@ return [
|
|||||||
'authManager' => [
|
'authManager' => [
|
||||||
'class' => Da\User\Component\AuthDbManagerComponent::class,
|
'class' => Da\User\Component\AuthDbManagerComponent::class,
|
||||||
],
|
],
|
||||||
|
'i18n' => [
|
||||||
|
'translations' => [
|
||||||
|
'usuario*' => [
|
||||||
|
'class' => 'yii\i18n\PhpMessageSource',
|
||||||
|
'basePath' => __DIR__ . '/../../../lib/User/resources/i18n',
|
||||||
|
'sourceLanguage' => 'en-US',
|
||||||
|
'fileMap' => [
|
||||||
|
'usuario' => 'usuario.php',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'controllerMap' => [
|
'controllerMap' => [
|
||||||
'migrate' => [
|
'migrate' => [
|
||||||
|
|||||||
@ -32,6 +32,18 @@ return [
|
|||||||
'cookieValidationKey' => 'test',
|
'cookieValidationKey' => 'test',
|
||||||
'enableCsrfValidation' => false,
|
'enableCsrfValidation' => false,
|
||||||
],
|
],
|
||||||
|
'i18n' => [
|
||||||
|
'translations' => [
|
||||||
|
'usuario*' => [
|
||||||
|
'class' => 'yii\i18n\PhpMessageSource',
|
||||||
|
'basePath' => __DIR__ . '/../../../lib/User/resources/i18n',
|
||||||
|
'sourceLanguage' => 'en-US',
|
||||||
|
'fileMap' => [
|
||||||
|
'usuario' => 'usuario.php',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'params' => [],
|
'params' => [],
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user