Blame view

views/order/update.php 1.09 KB
e0906f08   Alexey Boroda   -Fixing existing ...
1
  <?php
6f14188b   Alexey Boroda   -Product card fixed
2
      /**
7520dc0e   Alexey Boroda   -Grid with input ...
3
4
5
       * @var Order              $model
       * @var View               $this
       * @var ActiveDataProvider $dataProvider
6f14188b   Alexey Boroda   -Product card fixed
6
7
8
       */
      
      use artweb\artbox\ecommerce\models\Order;
7520dc0e   Alexey Boroda   -Grid with input ...
9
      use yii\data\ActiveDataProvider;
e0906f08   Alexey Boroda   -Fixing existing ...
10
      use yii\helpers\Html;
6f14188b   Alexey Boroda   -Product card fixed
11
      use yii\web\View;
e0906f08   Alexey Boroda   -Fixing existing ...
12
      
7520dc0e   Alexey Boroda   -Grid with input ...
13
      $this->title = 'Заказ #' . $model->id;
db3040d3   Alexey Boroda   -Order module alm...
14
15
16
17
      $this->params[ 'breadcrumbs' ][] = [
          'url'   => yii\helpers\Url::to([ '/ecommerce/order/index' ]),
          'label' => \Yii::t('app', 'Заказы'),
      ];
e0906f08   Alexey Boroda   -Fixing existing ...
18
      $this->params[ 'breadcrumbs' ][] = $this->title;
d57c8c00   Alexey Boroda   -Blocking in process
19
20
21
22
23
24
25
26
      
      $js = '
  $.ajax({
    type: "POST",
    url: "/admin/ecommerce/order/block-order",
    data: {
      id: ' . $model->id . '
    },
99de237f   Alexey Boroda   -Order block core...
27
    success: function(data) {
3bb55546   Alexey Boroda   -Fixing bugs
28
    $.notify({
99de237f   Alexey Boroda   -Order block core...
29
  	message: data.time 
3bb55546   Alexey Boroda   -Fixing bugs
30
          },{
99de237f   Alexey Boroda   -Order block core...
31
  	type: "info"
3bb55546   Alexey Boroda   -Fixing bugs
32
      });
d57c8c00   Alexey Boroda   -Blocking in process
33
34
35
36
37
    }
  });';
  
      $this->registerJs($js, View::POS_READY);
      
e0906f08   Alexey Boroda   -Fixing existing ...
38
  ?>
6f14188b   Alexey Boroda   -Product card fixed
39
  <div class="order-update">
db3040d3   Alexey Boroda   -Order module alm...
40
      <div class="container"><h1><?php echo Html::encode($this->title) ?></h1></div>
e0906f08   Alexey Boroda   -Fixing existing ...
41
      
6f14188b   Alexey Boroda   -Product card fixed
42
43
      <?= $this->render(
          '_form',
e0906f08   Alexey Boroda   -Fixing existing ...
44
          [
7520dc0e   Alexey Boroda   -Grid with input ...
45
46
              'model'        => $model,
              'dataProvider' => $dataProvider,
e0906f08   Alexey Boroda   -Fixing existing ...
47
48
          ]
      ) ?>
6f14188b   Alexey Boroda   -Product card fixed
49
  </div>