From 166e27c7bd323e2231efcfeccf45f0b6abb17b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 4 Oct 2021 12:33:52 +0200 Subject: [PATCH] Handle dynamic fields on frontend --- .../portal/ninja2020/auth/register.blade.php | 86 +++++++++++++++++-- 1 file changed, 80 insertions(+), 6 deletions(-) diff --git a/resources/views/portal/ninja2020/auth/register.blade.php b/resources/views/portal/ninja2020/auth/register.blade.php index cd4215f73ef3..806dec49996e 100644 --- a/resources/views/portal/ninja2020/auth/register.blade.php +++ b/resources/views/portal/ninja2020/auth/register.blade.php @@ -12,14 +12,88 @@
@csrf - @include('portal.ninja2020.auth.includes.register.personal_information') - {{ ctrans('texts.more_fields') }} +
+ @foreach($company->client_registration_fields as $field) +
+
+ + + @if($field['required']) +
*
+ @endif +
-
- @include('portal.ninja2020.auth.includes.register.website') - @include('portal.ninja2020.auth.includes.register.personal_address') - @include('portal.ninja2020.auth.includes.register.shipping_address') + @if($field['key'] === 'email') + + @elseif($field['key'] === 'password') + + @elseif($field['key'] === 'country_id') + + @else + + @endif + + @error($field['key']) +
+ {{ $message }} +
+ @enderror +
+ + @if($field['key'] === 'password') +
+
+ + + @if($field['required']) +
*
+ @endif +
+ + +
+ @endif + @endforeach