mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Minor fixes for required fields logic
This commit is contained in:
parent
1441127b29
commit
9615830e6b
@ -159,10 +159,6 @@ class InvoicePay extends Component
|
||||
|
||||
$this->setContext('fields', $fields); // $this->context['fields'] = $fields;
|
||||
|
||||
if ($company_gateway->always_show_required_fields) {
|
||||
return $this->required_fields = true;
|
||||
}
|
||||
|
||||
/** @var \App\Models\ClientContact $contact */
|
||||
$contact = $this->getContext()['contact'];
|
||||
|
||||
@ -184,6 +180,10 @@ class InvoicePay extends Component
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($company_gateway->always_show_required_fields) {
|
||||
return $this->required_fields = true;
|
||||
}
|
||||
|
||||
return $this->required_fields = false;
|
||||
|
||||
|
@ -96,13 +96,16 @@ class RequiredFields extends Component
|
||||
/** @var \App\Models\ClientContact $contact */
|
||||
$rff->check($contact);
|
||||
|
||||
if ($rff->unfilled_fields === 0) {
|
||||
if ($rff->unfilled_fields === 0 && !$this->company_gateway->always_show_required_fields)
|
||||
$this->dispatch('required-fields');
|
||||
}
|
||||
|
||||
if ($rff->unfilled_fields > 0) {
|
||||
else
|
||||
$this->is_loading = false;
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
// if ($rff->unfilled_fields > 0) {
|
||||
// $this->is_loading = false;
|
||||
// }
|
||||
}
|
||||
|
||||
public function handleSubmit(array $data)
|
||||
|
Loading…
Reference in New Issue
Block a user