From 46f904f4b934fa199fa5d4d065ae68a2f25f6602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 6 Mar 2024 17:38:01 +0100 Subject: [PATCH] Refactor registration form layout and add dynamic fields --- .../register-or-login.blade.php | 114 ++++++++++++++++-- 1 file changed, 103 insertions(+), 11 deletions(-) diff --git a/resources/views/billing-portal/v3/authentication/register-or-login.blade.php b/resources/views/billing-portal/v3/authentication/register-or-login.blade.php index a3d1a1e8ed45..33caa14f860a 100644 --- a/resources/views/billing-portal/v3/authentication/register-or-login.blade.php +++ b/resources/views/billing-portal/v3/authentication/register-or-login.blade.php @@ -93,18 +93,110 @@
@csrf - @foreach($this->registrationFields() as $field) -
- {{ $field['label'] }} - +
+ @if($subscription->company->client_registration_fields) + @foreach($subscription->company->client_registration_fields as $field) + @if($field['visible']) +
+
+ - @error($field['key']) - - @enderror -
- @endforeach + @if($field['required']) +
*
+ @endif + + + @if($field['key'] === 'email') + + @elseif($field['key'] === 'password') + + @elseif($field['key'] === 'currency_id') + + @elseif($field['key'] === 'country_id') + + @else + + @endif + + @error($field['key']) +
+ {{ $message }} +
+ @enderror +
+ + @if($field['key'] === 'password') +
+
+ + + @if($field['required']) +
*
+ @endif +
+ + +
+ @endif + @endif + @endforeach + @endif +