mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #6146 from beganovich/v5-2806-client-portal
(v5) Client portal changes
This commit is contained in:
commit
fcffa72568
@ -27,17 +27,23 @@ class RegisterRequest extends FormRequest
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
$rules = [
|
||||
'first_name' => ['required', 'string', 'max:255'],
|
||||
'last_name' => ['required', 'string', 'max:255'],
|
||||
'phone' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email:rfc,dns', 'max:255'],
|
||||
'password' => ['required', 'string', 'min:6', 'confirmed'],
|
||||
];
|
||||
|
||||
if ($this->company()->settings->client_portal_terms || $this->company()->settings->client_portal_privacy_policy) {
|
||||
$rules['terms'] = ['required'];
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
public function company()
|
||||
{
|
||||
{
|
||||
|
||||
//this should be all we need, the rest SHOULD be redundant because of our Middleware
|
||||
if ($this->key)
|
||||
@ -59,7 +65,7 @@ class RegisterRequest extends FormRequest
|
||||
if (Ninja::isHosted()) {
|
||||
|
||||
$subdomain = explode('.', $this->getHost())[0];
|
||||
|
||||
|
||||
$query = [
|
||||
'subdomain' => $subdomain,
|
||||
'portal_mode' => 'subdomain',
|
||||
@ -67,7 +73,7 @@ class RegisterRequest extends FormRequest
|
||||
|
||||
if($company = MultiDB::findAndSetDbByDomain($query))
|
||||
return $company;
|
||||
|
||||
|
||||
$query = [
|
||||
'portal_domain' => $this->getSchemeAndHttpHost(),
|
||||
'portal_mode' => 'domain',
|
||||
|
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"/js/app.js": "/js/app.js?id=696e8203d5e8e7cf5ff5",
|
||||
"/css/app.css": "/css/app.css?id=d9b987796d537e68bee7",
|
||||
"/css/app.css": "/css/app.css?id=9d6698418e6cdd571d49",
|
||||
"/js/clients/invoices/action-selectors.js": "/js/clients/invoices/action-selectors.js?id=a09bb529b8e1826f13b4",
|
||||
"/js/clients/invoices/payment.js": "/js/clients/invoices/payment.js?id=8ce8955ba775ea5f47d1",
|
||||
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=0dc8c34010d09195d2f7",
|
||||
|
@ -1,4 +1,5 @@
|
||||
<a class="button-link" x-on:click="{{ $property }} = true" href="#">{{ ctrans("texts.$property") }}</a>
|
||||
<a class="button-link underline" x-on:click="{{ $property }} = true" href="#">{{ ctrans("texts.$property") }}</a>
|
||||
|
||||
<span class="text-gray-300">/</span>
|
||||
|
||||
<div x-show="{{ $property }}" class="fixed bottom-0 inset-x-0 px-4 pb-4 sm:inset-0 sm:flex sm:items-center sm:justify-center">
|
||||
@ -20,11 +21,11 @@
|
||||
{{ $title }}
|
||||
</h3>
|
||||
<div class="mt-2">
|
||||
<p class="text-sm leading-5 text-gray-500">
|
||||
<p class="text-sm leading-5 text-gray-500 h-64 overflow-y-scroll">
|
||||
{{ $content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,11 +28,15 @@
|
||||
<input type="checkbox" name="terms" class="form-checkbox mr-2 cursor-pointer" checked>
|
||||
<span class="text-sm text-gray-800">
|
||||
|
||||
{{ ctrans('texts.i_agree') }}
|
||||
{{ ctrans('texts.i_agree_to_the') }}
|
||||
@endif
|
||||
|
||||
@includeWhen(!empty($company->settings->client_portal_terms), 'portal.ninja2020.auth.includes.register.popup', ['property' => 'terms_of_service', 'title' => ctrans('texts.terms_of_service'), 'content' => $company->settings->client_portal_terms])
|
||||
@includeWhen(!empty($company->settings->client_portal_privacy_policy), 'portal.ninja2020.auth.includes.register.popup', ['property' => 'privacy_policy', 'title' => ctrans('texts.privacy_policy'), 'content' => $company->settings->client_portal_privacy_policy])
|
||||
|
||||
@error('terms')
|
||||
<p class="text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</span>
|
||||
</span>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
<h3 class="text-xl leading-6 font-medium text-gray-900">
|
||||
{{ ctrans('texts.terms') }}
|
||||
</h3>
|
||||
<div class="mt-4">
|
||||
<div class="mt-4 h-64 overflow-y-scroll">
|
||||
@foreach($entities as $entity)
|
||||
<div class="mb-4">
|
||||
<p class="text-sm leading-6 font-medium text-gray-500">{{ $entity_type }} {{ $entity->number }}:</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user