diff --git a/src/controllers/DomainController.php b/src/controllers/DomainController.php index 3db0e441..57053846 100644 --- a/src/controllers/DomainController.php +++ b/src/controllers/DomainController.php @@ -500,12 +500,18 @@ public function actionCheckDomain() break; } } - $results[] = new Domain([ - 'domain' => $domain, +// $results[] = new Domain([ +// 'domain' => $domain, +// 'is_available' => (bool) 1, +// 'zone' => substr($domain, strpos($domain, '.') + 1), +// 'resource' => $tariff, +// ]); + $results[] = [ + 'domain' => $model->domain, 'is_available' => (bool) 1, - 'zone' => substr($domain, strpos($domain, '.') + 1), + 'zone' => substr($domain, strrpos($domain, '.') + 1), 'resource' => $tariff, - ]); + ]; } $domainCheckDataProvider->setModels($results); } @@ -514,6 +520,7 @@ public function actionCheckDomain() 'model' => $model, 'dropDownZonesOptions' => $dropDownZones, 'domainCheckDataProvider' => $domainCheckDataProvider, + 'results' => $results, ]); } diff --git a/src/views/domain/checkDomain.php b/src/views/domain/checkDomain.php index 3dab8b25..c4aec91e 100644 --- a/src/views/domain/checkDomain.php +++ b/src/views/domain/checkDomain.php @@ -115,88 +115,146 @@ function Plugin(element, options) { JS ); ?> -