mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
Form only view for required client info
This commit is contained in:
parent
39f33a5113
commit
938ffbe66b
@ -143,6 +143,8 @@ class RequiredClientInfo extends Component
|
|||||||
|
|
||||||
public $company_gateway_id;
|
public $company_gateway_id;
|
||||||
|
|
||||||
|
public bool $form_only = false;
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
@ -162,6 +164,15 @@ class RequiredClientInfo extends Component
|
|||||||
count($this->fields) > 0 || $this->show_terms
|
count($this->fields) > 0 || $this->show_terms
|
||||||
? $this->checkFields()
|
? $this->checkFields()
|
||||||
: $this->show_form = false;
|
: $this->show_form = false;
|
||||||
|
|
||||||
|
if (request()->query('source') === 'subscriptions') {
|
||||||
|
$this->show_form = false;
|
||||||
|
|
||||||
|
$this->dispatch(
|
||||||
|
'passed-required-fields-check',
|
||||||
|
client_postal_code: $this->contact->client->postal_code
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toggleTermsAccepted()
|
public function toggleTermsAccepted()
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
<div wire:ignore.self class="container mx-auto grid grid-cols-12 mb-4" data-ref="required-fields-container">
|
<div wire:ignore.self class="@unless($form_only) container mx-auto grid grid-cols-12 @endunless mb-4" data-ref="required-fields-container">
|
||||||
<div class="col-span-12 lg:col-span-6 lg:col-start-4 overflow-hidden bg-white shadow rounded-lg">
|
<div class="col-span-12 lg:col-span-6 lg:col-start-4 overflow-hidden @unless($form_only) bg-white shadow rounded-lg @endunless">
|
||||||
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
@unless($form_only)
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
||||||
{{ ctrans('texts.required_payment_information') }}
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
||||||
</h3>
|
{{ ctrans('texts.required_payment_information') }}
|
||||||
|
</h3>
|
||||||
|
|
||||||
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
||||||
{{ ctrans('texts.required_payment_information_more') }}
|
{{ ctrans('texts.required_payment_information_more') }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@endunless
|
||||||
|
|
||||||
<form id="required-client-info-form" x-on:submit.prevent="$wire.handleSubmit(Object.fromEntries(new FormData(document.getElementById('required-client-info-form'))))">
|
<form id="required-client-info-form" x-on:submit.prevent="$wire.handleSubmit(Object.fromEntries(new FormData(document.getElementById('required-client-info-form'))))">
|
||||||
@foreach($fields as $field)
|
@foreach($fields as $field)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user