diff --git a/src/views/domain/view.php b/src/views/domain/view.php index 47cdd08b..339e453a 100644 --- a/src/views/domain/view.php +++ b/src/views/domain/view.php @@ -1,25 +1,17 @@ nameservers = str_replace(',', ', ', $model->nameservers); @@ -205,39 +197,20 @@ // ] ], ]); ?> - hasModule('dns')): ?> - 'dns_zone_view', - 'enablePushState' => false, - 'enableReplaceState' => false, - ]); - - echo Progress::widget([ - 'id' => 'progress-bar', - 'percent' => 100, - 'barOptions' => ['class' => 'active progress-bar-striped', 'style' => 'width: 100%'], + hasModule('dns')) { + echo DnsZoneEditWidget::widget([ + 'domainId' => $model->id, + 'clientScriptWrap' => function ($js) { + return new \yii\web\JsExpression(" + $('a[data-toggle=tab]').filter(function () { + return $(this).attr('href') == '#dns-records'; + }).on('shown.bs.tab', function (e) { + $js + }); + "); + } ]); - - $url = Json::htmlEncode(Url::to(['@dns/zone/view', 'id' => $model->id])); - - $this->registerJs(" - $('a[data-toggle=tab]').filter(function () { - return $(this).attr('href') == '#dns-records'; - }).on('shown.bs.tab', function (e) { - var tab = $(e.target); - $.pjax({url: $url, container: '#dns_zone_view', 'push': false, 'replace': false}); - }) - "); - Pjax::end(); - ?> -render('dns/zone/view', [ -// 'model' => $model, -// 'recordsDataProvider' => (new \yii\data\ArrayDataProvider([ -// 'allModels' => $model->dnsRecords, -// ])), -// ]); ?> - + } ?>