mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 18:07:35 -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 bool $form_only = false; | ||||
| 
 | ||||
|     public function mount() | ||||
|     { | ||||
|         MultiDB::setDb($this->company->db); | ||||
| @ -162,6 +164,15 @@ class RequiredClientInfo extends Component | ||||
|         count($this->fields) > 0 || $this->show_terms | ||||
|             ? $this->checkFields() | ||||
|             : $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() | ||||
|  | ||||
| @ -1,14 +1,16 @@ | ||||
| <div wire:ignore.self class="container mx-auto grid grid-cols-12 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="px-4 py-5 border-b border-gray-200 sm:px-6"> | ||||
|             <h3 class="text-lg font-medium leading-6 text-gray-900"> | ||||
|                 {{ ctrans('texts.required_payment_information') }} | ||||
|             </h3> | ||||
| <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 @unless($form_only) bg-white shadow rounded-lg @endunless"> | ||||
|         @unless($form_only) | ||||
|             <div class="px-4 py-5 border-b border-gray-200 sm:px-6"> | ||||
|                 <h3 class="text-lg font-medium leading-6 text-gray-900"> | ||||
|                     {{ ctrans('texts.required_payment_information') }} | ||||
|                 </h3> | ||||
| 
 | ||||
|             <p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500"> | ||||
|                 {{ ctrans('texts.required_payment_information_more') }} | ||||
|             </p> | ||||
|         </div> | ||||
|                 <p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500"> | ||||
|                     {{ ctrans('texts.required_payment_information_more') }} | ||||
|                 </p> | ||||
|             </div> | ||||
|         @endunless   | ||||
| 
 | ||||
|         <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) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user