Finish version/v.0.0.4
This commit is contained in:
commit
4596ceb2fd
@ -98,10 +98,10 @@ class AdminMenuStructure{
|
||||
|
||||
protected function addLoginMainMenu(){
|
||||
if (Yii::$app->user->isGuest) {
|
||||
$mainMenuItem= ['label' => 'Login', 'url' => ['/site/login']];
|
||||
$mainMenuItem= ['label' => Yii::t('common/site','Login'), 'url' => ['/site/login']];
|
||||
} else {
|
||||
$mainMenuItem= [
|
||||
'label' => 'Kijelentkezés (' . Yii::$app->user->identity->username . ')',
|
||||
'label' => Yii::t('common/site','Logout') . '(' . Yii::$app->user->identity->username . ')',
|
||||
'url' => ['/site/logout'],
|
||||
'linkOptions' => ['data-method' => 'post']
|
||||
];
|
||||
|
||||
@ -55,6 +55,7 @@ class SiteController extends Controller
|
||||
|
||||
public function actionIndex()
|
||||
{
|
||||
Yii::$app->security->generatePasswordHash('test');
|
||||
return $this->render('index');
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,13 @@
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
|
||||
$this->title = 'Login';
|
||||
$this->title = Yii::t('common/site' , 'Login');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="site-login">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>Please fill out the following fields to login:</p>
|
||||
<p><?php echo Yii::t('common/site' , 'Please fill out the following fields to login:') ?> </p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
@ -26,7 +26,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= $form->field($model, 'rememberMe')->checkbox() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
|
||||
<?= Html::submitButton( Yii::t('common/site' ,'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
@ -19,6 +19,7 @@ return [
|
||||
'class' => 'yii\i18n\Formatter',
|
||||
'dateFormat' => 'yyyy.MM.dd',
|
||||
'datetimeFormat' => 'yyyy.MM.dd HH:mm',
|
||||
'timeFormat' => 'HH:mm',
|
||||
'locale' => 'hu-Hu',
|
||||
'timeZone' => 'UTC',
|
||||
'defaultTimeZone' => 'UTC' ,
|
||||
|
||||
@ -3,5 +3,5 @@ return [
|
||||
'adminEmail' => 'rocho02@gmail.com',
|
||||
'supportEmail' => 'rocho02@gmail.com',
|
||||
'user.passwordResetTokenExpire' => 3600,
|
||||
'version' => 'v0.0.3'
|
||||
'version' => 'v0.0.4'
|
||||
];
|
||||
|
||||
@ -17,6 +17,6 @@
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Close' => 'Nyitás',
|
||||
'Open' => 'Zárás',
|
||||
'Close' => 'Zárás',
|
||||
'Open' => 'Nyitás',
|
||||
];
|
||||
|
||||
32
common/messages/hu/common/site.php
Normal file
32
common/messages/hu/common/site.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yii message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Logout' => 'Kijelentkezés',
|
||||
'Forgot password' => 'Elfelejtett jelszó',
|
||||
'Login' => 'Bejelentkezés',
|
||||
'Password' => 'Jelszó',
|
||||
'Please choose your new password:' => 'Kérem válasszon új jelszót:',
|
||||
'Please fill out the following fields to login:' => 'Kérem töltse ki a következő mezőket a bejelentkezéshez:',
|
||||
'Please fill out your email. A link to reset password will be sent there.' => 'Kérem adja meg az email címét.Értesítést fog kapni a jelszava megváltoztatásáról!',
|
||||
'Remember me' => 'Emlékezz rám',
|
||||
'Request password reset' => 'Jelszó módosítás kérése',
|
||||
'Reset password' => 'Jelszó módosítása',
|
||||
'Send' => 'Küldés',
|
||||
'Username' => 'Felhasználónév/E-mail',
|
||||
];
|
||||
@ -17,6 +17,8 @@
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Reception' => 'Recepció',
|
||||
'Reset' => 'Módosítás',
|
||||
'Adatlap' => 'Adatlap',
|
||||
'Are you sure you want to delete this item?' => 'Biztosan törölni szeretné ezt a vendéget?',
|
||||
'Befizetések' => 'Befizetések',
|
||||
@ -24,7 +26,6 @@ return [
|
||||
'Create Customer' => 'Új vendég',
|
||||
'Customers' => 'Vendégek',
|
||||
'Delete' => 'Törlés',
|
||||
'Reset' => '',
|
||||
'Search' => 'Keresés',
|
||||
'Update' => 'Módosítás',
|
||||
];
|
||||
|
||||
@ -17,8 +17,9 @@
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Money movements' => 'Pénzmozgások',
|
||||
'Account' => 'Kassza',
|
||||
'User' => 'Felhasználó',
|
||||
'End' => 'Időintervallum vége',
|
||||
'Start' => 'Időintervallum kezdete',
|
||||
'User' => 'Felhasználó',
|
||||
];
|
||||
|
||||
22
common/messages/hu/frontend/site.php
Normal file
22
common/messages/hu/frontend/site.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yii message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Login' => 'Bejelentkezés',
|
||||
'Password' => 'Jelszó',
|
||||
];
|
||||
@ -17,6 +17,7 @@
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Logout' => 'Kijelentkezés',
|
||||
'Create' => 'Mentés',
|
||||
'Create Money Movement' => 'Új pénzmozgás',
|
||||
'Create Transfer' => 'Új pénzmozgás',
|
||||
|
||||
@ -205,7 +205,7 @@ class AccountState extends \common\models\BaseFitnessActiveRecord
|
||||
|
||||
public function hasDifferenceToPrevState(){
|
||||
$result = false;
|
||||
if ( isset( $this->prev_state ) ){
|
||||
if ( isset( $this->prev_state ) && $this->type == self::TYPE_OPEN){
|
||||
$result = $this->prev_money != $this->money;
|
||||
}
|
||||
return $result;
|
||||
|
||||
@ -31,6 +31,14 @@ class LoginForm extends Model
|
||||
];
|
||||
}
|
||||
|
||||
public function attributeLabels(){
|
||||
return [
|
||||
'username' =>Yii::t('common/site', 'Username'),
|
||||
'password' =>Yii::t('common/site', 'Password'),
|
||||
'rememberMe' =>Yii::t('common/site', 'Remember me'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the password.
|
||||
* This method serves as the inline validation for password.
|
||||
|
||||
@ -378,7 +378,7 @@ class Transfer extends \common\models\BaseFitnessActiveRecord
|
||||
'money',
|
||||
'money_currency',
|
||||
'time' => function ($transfer){
|
||||
return Yii::$app->formatter->asTime($transfer->created_at);
|
||||
return Yii::$app->formatter->asDatetime($transfer->created_at);
|
||||
},
|
||||
'account_name' => function ($transfer) {
|
||||
return $transfer->account->name;
|
||||
|
||||
@ -11,6 +11,8 @@ return [
|
||||
'mailer' => [
|
||||
'class' => 'yii\swiftmailer\Mailer',
|
||||
'viewPath' => '@common/mail',
|
||||
'fileTransport' => true,
|
||||
'transport' =>[]
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -56,16 +56,16 @@ class FrontendMenuStructure{
|
||||
|
||||
protected function addRecepcio(){
|
||||
if ( $this->isLogged() ){
|
||||
$this->menuItems[] = ['label' => 'Recepció', 'url' => ['/customer/reception'] ];
|
||||
$this->menuItems[] = ['label' => 'Kassza',
|
||||
$this->menuItems[] = ['label' => Yii::t('frontend/customer','Reception'), 'url' => ['/customer/reception'] ];
|
||||
$this->menuItems[] = ['label' => Yii::t('frontend/account', 'Account'),
|
||||
'items' => [
|
||||
['label' => Yii::t('frontend/account-state','Default account'), 'url' => ['/account/select'] ],
|
||||
['label' => Yii::t('frontend/account-state', 'Account states'), 'url' => ['/account-state/index'] ],
|
||||
['label' => Yii::t('frontend/account-state','Open account state'), 'url' => ['/account-state/open'] ],
|
||||
['label' => Yii::t('frontend/account-state','Close account state'), 'url' => ['/account-state/close'] ],
|
||||
['label' => 'Pénzmozgások', 'url' => [ '/money-movement/index', 'MoneyMovementSearch[start]' => $this->start, 'MoneyMovementSearch[end]' => $this->tomorrow ] ],
|
||||
['label' => Yii::t('frontend/money-movement','Money movements'), 'url' => [ '/money-movement/index', 'MoneyMovementSearch[start]' => $this->start, 'MoneyMovementSearch[end]' => $this->tomorrow ] ],
|
||||
['label' => Yii::t('frontend/transfer','Transfers'), 'url' => ['/transfer/index', 'TransferSearch[start]' => $this->start, 'TransferSearch[end]' => $this->tomorrow ] ],
|
||||
['label' => 'Zárások', 'url' => ['/collection/index' , 'CollectionSearch[start]' =>$this->start,'CollectionSearch[end]' => $this->tomorrow ] ]
|
||||
['label' => Yii::t('frontend/collection','Collections'), 'url' => ['/collection/index' , 'CollectionSearch[start]' =>$this->start,'CollectionSearch[end]' => $this->tomorrow ] ]
|
||||
]
|
||||
];
|
||||
}
|
||||
@ -74,10 +74,10 @@ class FrontendMenuStructure{
|
||||
|
||||
protected function addLoginMainMenu(){
|
||||
if (Yii::$app->user->isGuest) {
|
||||
$mainMenuItem= ['label' => 'Login', 'url' => ['/site/login']];
|
||||
$mainMenuItem= ['label' => Yii::t('frontend/site','Login'), 'url' => ['/site/login']];
|
||||
} else {
|
||||
$mainMenuItem= [
|
||||
'label' => 'Kijelentkezés (' . Yii::$app->user->identity->username . ')',
|
||||
'label' => Yii::t('frontend/transfer','Logout'). '(' . Yii::$app->user->identity->username . ')',
|
||||
'url' => ['/site/logout'],
|
||||
'linkOptions' => ['data-method' => 'post']
|
||||
];
|
||||
|
||||
@ -49,6 +49,12 @@ class ResetPasswordForm extends Model
|
||||
];
|
||||
}
|
||||
|
||||
public function attributeLabels(){
|
||||
return [
|
||||
'passowrd' => Yii::t('frontend/site' , 'Password')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets password.
|
||||
*
|
||||
|
||||
@ -1,16 +1,11 @@
|
||||
<?php
|
||||
|
||||
use frontend\components\ReceptionMenuWidget;
|
||||
use frontend\components\ReceptionCardNumberWidget;
|
||||
use yii\helpers\Html;
|
||||
use common\models\Product;
|
||||
use frontend\assets\ProductSellAsset;
|
||||
use yii\helpers\Url;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use common\models\Discount;
|
||||
use frontend\components\ReceptionWidget;
|
||||
use common\models\Account;
|
||||
use common\models\Discount;
|
||||
use frontend\assets\ProductSellAsset;
|
||||
use frontend\components\ReceptionWidget;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $form yii\bootstrap\ActiveForm */
|
||||
@ -67,7 +62,19 @@ $this->params['breadcrumbs'][] = Yii::t('frontend/product', 'Sale');
|
||||
.table-transfers tbody .product-name,
|
||||
.table-transfers tbody .product-time
|
||||
{
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
}
|
||||
.table-transfers .product-time{
|
||||
width: 140px;
|
||||
}
|
||||
.table-transfers .product-count{
|
||||
width: 50px;
|
||||
}
|
||||
.table-transfers .sale-price{
|
||||
width: 80px;
|
||||
}
|
||||
.table-transfers .product-money{
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
|
||||
$this->title = 'Login';
|
||||
$this->title = Yii::t('common/site' ,'Login');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="site-login">
|
||||
@ -26,11 +26,11 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= $form->field($model, 'rememberMe')->checkbox() ?>
|
||||
|
||||
<div style="color:#999;margin:1em 0">
|
||||
If you forgot your password you can <?= Html::a('reset it', ['site/request-password-reset']) ?>.
|
||||
<?= Html::a(Yii::t('common/site' ,'Forgot password'), ['site/request-password-reset']) ?>.
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
|
||||
<?= Html::submitButton(Yii::t('common/site' ,'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
@ -7,13 +7,13 @@
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
|
||||
$this->title = 'Request password reset';
|
||||
$this->title = Yii::t('common/site' ,'Request password reset');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="site-request-password-reset">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>Please fill out your email. A link to reset password will be sent there.</p>
|
||||
<p><?php echo Yii::t('common/site' ,'Please fill out your email. A link to reset password will be sent there.') ?></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= $form->field($model, 'email') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Send', ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::submitButton( Yii::t('common/site' ,'Send'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
@ -7,13 +7,13 @@
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
|
||||
$this->title = 'Reset password';
|
||||
$this->title = Yii::t('common/site' ,'Reset password');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="site-reset-password">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>Please choose your new password:</p>
|
||||
<p><?php echo Yii::t('common/site' ,'Please choose your new password:') ?></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user