1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/resources/views/portal/ninja2020/auth/register.blade.php

135 lines
7.6 KiB
PHP
Raw Normal View History

2020-06-22 10:47:55 +02:00
@extends('portal.ninja2020.layout.clean', ['custom_body_class' => 'bg-gray-100'])
2020-05-28 17:39:38 +02:00
@section('meta_title', ctrans('texts.register'))
@section('body')
2020-06-22 15:33:56 +02:00
<div class="grid lg:grid-cols-12 py-8">
2021-06-16 16:26:08 +02:00
<div class="col-span-12 lg:col-span-8 lg:col-start-3 xl:col-span-6 xl:col-start-4 px-6">
<div class="flex justify-center">
2022-03-23 13:07:33 +01:00
<img class="h-32 w-auto" src="{{ $register_company->present()->logo() }}" alt="{{ ctrans('texts.logo') }}">
2020-06-18 17:09:28 +02:00
</div>
<h1 class="text-center text-3xl mt-8">{{ ctrans('texts.register') }}</h1>
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
2020-06-18 17:09:28 +02:00
<form action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{more: false, busy: false, isSubmitted: false}" x-on:submit="isSubmitted = true">
2022-03-23 13:07:33 +01:00
@if($register_company)
<input type="hidden" name="company_key" value="{{ $register_company->company_key }}">
2021-12-13 05:22:16 +01:00
@endif
@csrf
2020-06-22 10:47:55 +02:00
2021-10-04 12:33:52 +02:00
<div class="grid grid-cols-12 gap-4 mt-10">
2022-03-23 13:07:33 +01:00
@if($register_company->client_registration_fields)
@foreach($register_company->client_registration_fields as $field)
2021-10-04 12:48:41 +02:00
@if($field['required'])
2021-10-04 12:33:52 +02:00
<div class="col-span-12 md:col-span-6">
<section class="flex items-center">
<label
2021-10-04 12:48:41 +02:00
for="{{ $field['key'] }}"
2021-10-04 12:33:52 +02:00
class="input-label">
2021-10-04 12:48:41 +02:00
{{ ctrans("texts.{$field['key']}") }}
2021-10-04 12:33:52 +02:00
</label>
@if($field['required'])
<section class="text-red-400 ml-1 text-sm">*</section>
@endif
</section>
2021-10-04 12:48:41 +02:00
@if($field['key'] === 'email')
<input
id="{{ $field['key'] }}"
class="input w-full"
type="email"
name="{{ $field['key'] }}"
value="{{ old($field['key']) }}"
/>
2021-10-04 12:48:41 +02:00
@elseif($field['key'] === 'password')
<input
id="{{ $field['key'] }}"
class="input w-full"
type="password"
name="{{ $field['key'] }}"
/>
2021-10-04 12:48:41 +02:00
@elseif($field['key'] === 'country_id')
<select
id="shipping_country"
2022-09-06 12:51:42 +02:00
class="input w-full form-select bg-white"
2022-02-12 06:05:05 +01:00
name="country_id">
2021-10-04 12:48:41 +02:00
<option value="none"></option>
@foreach(App\Utils\TranslationHelper::getCountries() as $country)
<option
{{ $country == isset(auth()->user()->client->shipping_country->id) ? 'selected' : null }} value="{{ $country->id }}">
{{ $country->iso_3166_2 }}
({{ $country->name }})
</option>
@endforeach
</select>
@else
<input
id="{{ $field['key'] }}"
class="input w-full"
name="{{ $field['key'] }}"
2021-10-20 18:09:28 +02:00
value="{{ old($field['key']) }}"
/>
2021-10-04 12:48:41 +02:00
@endif
@error($field['key'])
<div class="validation validation-fail">
{{ $message }}
</div>
@enderror
2021-10-04 12:33:52 +02:00
</div>
2021-10-04 12:48:41 +02:00
@if($field['key'] === 'password')
<div class="col-span-12 md:col-span-6">
<section class="flex items-center">
<label
for="password_confirmation"
class="input-label">
{{ ctrans('texts.password_confirmation') }}
</label>
@if($field['required'])
<section class="text-red-400 ml-1 text-sm">*</section>
@endif
</section>
<input
id="password_confirmation"
type="password"
class="input w-full"
name="password_confirmation"
/>
2021-10-04 12:48:41 +02:00
</div>
@endif
2021-10-04 12:33:52 +02:00
@endif
@endforeach
2021-10-08 11:51:55 +02:00
@endif
2020-06-18 17:09:28 +02:00
</div>
<div class="flex justify-between items-center mt-8">
2020-06-22 15:33:56 +02:00
<span class="inline-flex items-center" x-data="{ terms_of_service: false, privacy_policy: false }">
2022-03-23 13:07:33 +01:00
@if(!empty($register_company->settings->client_portal_terms) || !empty($register_company->settings->client_portal_privacy_policy))
2020-06-22 15:33:56 +02:00
<input type="checkbox" name="terms" class="form-checkbox mr-2 cursor-pointer" checked>
<span class="text-sm text-gray-800">
{{ ctrans('texts.i_agree_to_the') }}
2020-06-22 15:33:56 +02:00
@endif
2022-03-23 13:07:33 +01:00
@includeWhen(!empty($register_company->settings->client_portal_terms), 'portal.ninja2020.auth.includes.register.popup', ['property' => 'terms_of_service', 'title' => ctrans('texts.terms_of_service'), 'content' => $register_company->settings->client_portal_terms])
@includeWhen(!empty($register_company->settings->client_portal_privacy_policy), 'portal.ninja2020.auth.includes.register.popup', ['property' => 'privacy_policy', 'title' => ctrans('texts.privacy_policy'), 'content' => $register_company->settings->client_portal_privacy_policy])
@error('terms')
<p class="text-red-600">{{ $message }}</p>
@enderror
</span>
2020-06-18 17:09:28 +02:00
</span>
<button class="button button-primary bg-blue-600" :disabled={{ $submitsForm == 'true' ? 'isSubmitted' : 'busy'}} x-on:click="busy = true">{{ ctrans('texts.register')}}</button>
</div>
</form>
</div>
2020-05-28 17:39:38 +02:00
</div>
@endsection