From d0f1a92a6de94a7de6b8834d881b799720a8a7c3 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:17:21 +0200 Subject: [PATCH] Added registrar create form --- cp/app/Controllers/RegistrarsController.php | 16 + .../views/admin/registrars/create.twig | 552 ++++++++++++++++++ .../views/admin/registrars/index.twig | 4 +- cp/resources/views/layouts/app.twig | 4 +- cp/routes/web.php | 1 + database/registry.mariadb.sql | 4 +- database/registry.postgres.sql | 4 +- 7 files changed, 577 insertions(+), 8 deletions(-) create mode 100644 cp/resources/views/admin/registrars/create.twig diff --git a/cp/app/Controllers/RegistrarsController.php b/cp/app/Controllers/RegistrarsController.php index 3cef757..39bad3e 100644 --- a/cp/app/Controllers/RegistrarsController.php +++ b/cp/app/Controllers/RegistrarsController.php @@ -6,6 +6,7 @@ use App\Models\RegistryTransaction; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Container\ContainerInterface; +use League\ISO3166\ISO3166; class RegistrarsController extends Controller { @@ -13,4 +14,19 @@ class RegistrarsController extends Controller { return view($response,'admin/registrars/index.twig'); } + + public function create(Request $request, Response $response) + { + if ($_SESSION["auth_roles"] != 0) { + return $response->withHeader('Location', '/dashboard')->withStatus(302); + } + + $iso3166 = new ISO3166(); + $countries = $iso3166->all(); + + // Default view for GET requests or if POST data is not set + return view($response,'admin/registrars/create.twig', [ + 'countries' => $countries, + ]); + } } \ No newline at end of file diff --git a/cp/resources/views/admin/registrars/create.twig b/cp/resources/views/admin/registrars/create.twig new file mode 100644 index 0000000..decc10d --- /dev/null +++ b/cp/resources/views/admin/registrars/create.twig @@ -0,0 +1,552 @@ +{% extends "layouts/app.twig" %} + +{% block title %}{{ __('Create Registrar') }}{% endblock %} + +{% block content %} +
+ Whitelist IP addresses for secure access. Up to 5 IP addresses (IPv4 or IPv6) can be added. +
+ ++ Create a registrar user by specifying the username, email, and passwords for both EPP and panel access. +
+Username | +EPP User Password | +Panel User Password | +|
---|---|---|---|
+ + | ++ + | ++ + | ++ + | +
+ Operational Test and Evaluation (OTE) assesses the functionality of EPP commands in a simulated environment, ensuring effective communication between the registrar's system and the registry. Below are key EPP commands and their test statuses: +
+