64 lines
2.1 KiB
PHP
64 lines
2.1 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\DetailView;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\InventoryItem */
|
|
|
|
$this->title = Yii::t('common/inventory-item', 'Leltár termék');
|
|
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/inventory-item', 'Inventory Items'), 'url' => ['index']];
|
|
$this->params['breadcrumbs'][] = ['label' => $model->id_inventory_item, 'url' => ['view', 'id' => $model->id_inventory_item]];
|
|
$this->params['breadcrumbs'][] = Yii::t('common/inventory-item', 'Update');
|
|
|
|
\backend\assets\InventoryItemUpdateAsset::register($this);
|
|
|
|
$options = [];
|
|
$options['products'] = $products;
|
|
$options['url_find_inventory_item'] = \yii\helpers\Url::toRoute(['inventory-item/update-item']);
|
|
$options['url_save'] = \yii\helpers\Url::toRoute(['inventory-item/update-item']);
|
|
$options['id_product'] = $model->id_product;
|
|
|
|
$this->registerJs('FitnessAdmin.InventoryItem.Update.init( '. json_encode( $options ) .' );');
|
|
?>
|
|
<div class="inventory-item-update">
|
|
|
|
<h1><?= Html::encode($this->title) ?></h1>
|
|
|
|
<h2>Leltár</h2>
|
|
<?= DetailView::widget([
|
|
'model' => $inventory,
|
|
'attributes' => [
|
|
'id_inventory',
|
|
'name',
|
|
['attribute'=>'id_user',
|
|
'value'=>$inventory->userName
|
|
],
|
|
['attribute'=>'id_account',
|
|
'value'=>$inventory->accountName
|
|
],
|
|
'created_at:datetime',
|
|
],
|
|
]) ?>
|
|
|
|
<?php $form = \yii\widgets\ActiveForm::begin(); ?>
|
|
|
|
<?php echo Html::textInput("product_autocomplete","",['class' => 'form-control', 'id' => 'product_autocomplete','autocomplete' => 'off']) ?>
|
|
<?php echo Html::hiddenInput("product_id","",[ 'id' => 'product_id','autocomplete' => 'off']) ?>
|
|
|
|
<?php \yii\widgets\ActiveForm::end(); ?>
|
|
|
|
<h2>Termék</h2>
|
|
<table class="table table-striped table-bordered detail-view">
|
|
<tbody><tr><th>Név</th><td id="inventory_product_name"> <?php echo Html::getAttributeValue($model, 'name') ?> </td></tr></tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<?= $this->render('_form', [
|
|
'model' => $model,
|
|
]) ?>
|
|
|
|
|
|
</div>
|