add customerapi + customer auth

This commit is contained in:
2019-09-30 19:33:48 +02:00
committed by Roland Schneider
parent 51788f2194
commit 9aee187d11
55 changed files with 21835 additions and 14 deletions

View File

@@ -0,0 +1,84 @@
<?php
/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use customerapi\assets\AppAsset;
use common\widgets\Alert;
use kartik\widgets\AlertBlock;
use yii\helpers\Url;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<script>
var reception_card_url = '<?php echo Url::toRoute('customer/reception');?>';
</script>
<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<div class="wrap">
<?php
$items = [];
NavBar::begin([
'brandLabel' => 'Web Recepció',
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar-inverse navbar-fixed-top',
],
]);
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'items' => $items,
]);
NavBar::end();
?>
<div class="container">
<?= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>
<?= Alert::widget() ?>
<?= $content ?>
</div>
</div>
<footer class="footer" style="min-height: 60px; height: auto;">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="pull-left">&copy; <?= Yii::$app->name ?> <?= Yii::$app->params['version'] ?> Fitness - WebAdmin <?= date('Y') ?></p>
</div>
</div>
<div class="row">
<div class="col-md-12">
Ingyenesen használható alkalmazás.
Az oldalon szereplő adatok csak tájékoztató jellegűek.<br>
Az adatok helyességéért és igazságtartalmáért felelősséget nem vállalunk.<br>
Az oldal nem használható hivatalos adatforrásként.<br>
</div>
</div>
</div>
</footer>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>

View File

@@ -0,0 +1,27 @@
<?php
/* @var $this yii\web\View */
/* @var $name string */
/* @var $message string */
/* @var $exception Exception */
use yii\helpers\Html;
$this->title = $name;
?>
<div class="site-error">
<h1><?= Html::encode($this->title) ?></h1>
<div class="alert alert-danger">
<?= nl2br(Html::encode($message)) ?>
</div>
<p>
The above error occurred while the Web server was processing your request.
</p>
<p>
Please contact us if you think this is a server error. Thank you.
</p>
</div>

View File

@@ -0,0 +1,14 @@
<?php
/* @var $this yii\web\View */
$this->title = 'My Yii Application';
?>
<div class="site-index">
<div class="jumbotron">
<h1>Web Recepció</h1>
<p class="lead">Üdvözöljük Web Recepció oldalunkon!</p>
</div>
</div>

View File

@@ -0,0 +1,39 @@
<?php
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$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>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
<?= $form->field($model, 'username') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'rememberMe')->checkbox() ?>
<div style="color:#999;margin:1em 0">
<?= Html::a(Yii::t('common/site' ,'Forgot password'), ['site/request-password-reset']) ?>.
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('common/site' ,'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>