';
+ }
+ }
+}
diff --git a/app/Controllers/ApiController.php b/app/Controllers/ApiController.php
index 99870c8..77c497f 100644
--- a/app/Controllers/ApiController.php
+++ b/app/Controllers/ApiController.php
@@ -22,6 +22,7 @@ use \App\Controllers\Api\Users\LoadUser as UserLoad;
use \App\Controllers\Api\Admin\Images\SetVisibility as AdminPhotoSetVisibility;
use \App\Controllers\Api\Admin\CreateNews as AdminCreateNews;
use \App\Controllers\Api\Admin\LoadNews as AdminLoadNews;
+use \App\Controllers\Api\Admin\GetVehicleInputs as AdminGetVehicleInputs;
class ApiController
{
@@ -83,6 +84,9 @@ class ApiController
public static function adminloadnews() {
return new AdminLoadNews();
}
+ public static function admingetvehicleinputs() {
+ return new AdminGetVehicleInputs();
+ }
}
\ No newline at end of file
diff --git a/app/Core/Routes.php b/app/Core/Routes.php
index 37128f5..7075d6c 100644
--- a/app/Core/Routes.php
+++ b/app/Core/Routes.php
@@ -65,6 +65,7 @@ class Routes
Router::any('/api/admin/images/setvisibility', 'ApiController@adminsetvis');
Router::any('/api/admin/createnews', 'ApiController@admincreatenews');
Router::any('/api/admin/loadnews', 'ApiController@adminloadnews');
+ Router::any('/api/admin/getvehicleinputs/$id', 'ApiController@admingetvehicleinputs');
}
Router::get('/logout', 'MainController@logout');
Router::get('/404', 'ExceptionRegister@notfound');
diff --git a/views/pages/Admin/EntityCreate.php b/views/pages/Admin/EntityCreate.php
index fc80aa7..12aba5f 100644
--- a/views/pages/Admin/EntityCreate.php
+++ b/views/pages/Admin/EntityCreate.php
@@ -38,10 +38,11 @@ if (isset($_POST['create'])) {
-
-
-
-
+
+
+
+
+
Вводимые переменные
Добавляйте и регулируйте поля ввода, которые будут являться шаблонной формой для создания моделей к сущности.
diff --git a/views/pages/Admin/ModelsCreate.php b/views/pages/Admin/ModelsCreate.php
index ad3d490..ceb63b5 100644
--- a/views/pages/Admin/ModelsCreate.php
+++ b/views/pages/Admin/ModelsCreate.php
@@ -4,6 +4,7 @@ use \App\Services\{Auth, DB};
use \App\Models\{User, Vehicle};
+$vehicle = DB::query('SELECT * FROM entities WHERE id=:id', array(':id' => $_GET['id']))[0];
if (isset($_POST['create'])) {
$postData = $_POST;
@@ -33,92 +34,52 @@ if (isset($_POST['create'])) {
header('Location: /admin?type=Entities');
}
?>
-