door card pass: create table and create model and console controller
This commit is contained in:
@@ -61,25 +61,25 @@ $card = $model->card;
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['key/toggle', 'number' => $model->getCardNumber()],
|
||||
'method' => 'post',
|
||||
]); ?>
|
||||
<div class="row" style="margin-bottom: 6px;">
|
||||
<div class='col-md-12'>
|
||||
<?php echo Html::hiddenInput('number', $model->getCardNumber())?>
|
||||
<?php echo Html::textInput('KeyToggleForm[key]','',['class'=>"form-control", 'placeholder' =>'Kulcs']) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class='col-md-12'>
|
||||
<?= Html::submitButton(Yii::t('frontend/collection', 'Kulcs Ki/Be'), ['class' => 'btn btn-primary btn-block']) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
<?php
|
||||
$doorEntryStrategy = \common\components\Helper::getDoorEntryStrategy();
|
||||
if ( $doorEntryStrategy === 'door_pass'){
|
||||
echo $this->render(
|
||||
'//common/door_entry_strategy/_strategy_door_pass',
|
||||
[
|
||||
'model' => $model
|
||||
]);
|
||||
}else {
|
||||
echo $this->render(
|
||||
'//common/door_entry_strategy/_strategy_key',
|
||||
[
|
||||
'model' => $model
|
||||
]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<?php if ( isset($model->customer) ) { ?>
|
||||
<?php $form = ActiveForm::begin([
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use frontend\components\HtmlHelper;
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $card common\models\Card */
|
||||
/* @var $customer common\models\Customer */
|
||||
/* @var $model frontend\models\ReceptionForm */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['door-card-pass/allow', 'number' => $model->getCardNumber()],
|
||||
'method' => 'post',
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class='col-md-12'>
|
||||
<?= Html::submitButton( "Kapun beléphet", ['class' => 'btn btn-primary btn-block']) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
30
frontend/views/common/door_entry_strategy/_strategy_key.php
Normal file
30
frontend/views/common/door_entry_strategy/_strategy_key.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use frontend\components\HtmlHelper;
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $card common\models\Card */
|
||||
/* @var $customer common\models\Customer */
|
||||
/* @var $model frontend\models\ReceptionForm */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['key/toggle', 'number' => $model->getCardNumber()],
|
||||
'method' => 'post',
|
||||
]); ?>
|
||||
<div class="row" style="margin-bottom: 6px;">
|
||||
<div class='col-md-12'>
|
||||
<?php echo Html::hiddenInput('number', $model->getCardNumber())?>
|
||||
<?php echo Html::textInput('KeyToggleForm[key]','',['class'=>"form-control", 'placeholder' =>'Kulcs']) ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class='col-md-12'>
|
||||
<?= Html::submitButton(Yii::t('frontend/collection', 'Kulcs Ki/Be'), ['class' => 'btn btn-primary btn-block']) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
Reference in New Issue
Block a user