mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 12:44:31 -04:00
Fixes for required fields for paytrace
This commit is contained in:
parent
37892cbe7f
commit
f77bfe2bc7
@ -254,7 +254,20 @@ class PaytracePaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
public function getClientRequiredFields(): array
|
public function getClientRequiredFields(): array
|
||||||
{
|
{
|
||||||
$fields = parent::getClientRequiredFields();
|
|
||||||
|
$fields = [];
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_client_name) {
|
||||||
|
$fields[] = ['name' => 'client_name', 'label' => ctrans('texts.client_name'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$fields[] = ['name' => 'contact_first_name', 'label' => ctrans('texts.first_name'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
$fields[] = ['name' => 'contact_last_name', 'label' => ctrans('texts.last_name'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
$fields[] = ['name' => 'contact_email', 'label' => ctrans('texts.email'), 'type' => 'text', 'validation' => 'required,email:rfc'];
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_client_phone) {
|
||||||
|
$fields[] = ['name' => 'client_phone', 'label' => ctrans('texts.client_phone'), 'type' => 'tel', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
$fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required'];
|
$fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required'];
|
||||||
$fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required'];
|
$fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required'];
|
||||||
@ -262,6 +275,35 @@ class PaytracePaymentDriver extends BaseDriver
|
|||||||
$fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required'];
|
$fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required'];
|
||||||
$fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required'];
|
$fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_shipping_address) {
|
||||||
|
$fields[] = ['name' => 'client_shipping_address_line_1', 'label' => ctrans('texts.shipping_address1'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
$fields[] = ['name' => 'client_shipping_city', 'label' => ctrans('texts.shipping_city'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
$fields[] = ['name' => 'client_shipping_state', 'label' => ctrans('texts.shipping_state'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
$fields[] = ['name' => 'client_shipping_postal_code', 'label' => ctrans('texts.shipping_postal_code'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
$fields[] = ['name' => 'client_shipping_country_id', 'label' => ctrans('texts.shipping_country'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_custom_value1) {
|
||||||
|
$fields[] = ['name' => 'client_custom_value1', 'label' => $this->helpers->makeCustomField($this->client->company->custom_fields, 'client1'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_custom_value2) {
|
||||||
|
$fields[] = ['name' => 'client_custom_value2', 'label' => $this->helpers->makeCustomField($this->client->company->custom_fields, 'client2'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_custom_value3) {
|
||||||
|
$fields[] = ['name' => 'client_custom_value3', 'label' => $this->helpers->makeCustomField($this->client->company->custom_fields, 'client3'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->company_gateway->require_custom_value4) {
|
||||||
|
$fields[] = ['name' => 'client_custom_value4', 'label' => $this->helpers->makeCustomField($this->client->company->custom_fields, 'client4'), 'type' => 'text', 'validation' => 'required'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
public/build/assets/app-4e969b65.css
vendored
1
public/build/assets/app-4e969b65.css
vendored
File diff suppressed because one or more lines are too long
@ -345,7 +345,7 @@
|
|||||||
"src": "resources/js/setup/setup.js"
|
"src": "resources/js/setup/setup.js"
|
||||||
},
|
},
|
||||||
"resources/sass/app.scss": {
|
"resources/sass/app.scss": {
|
||||||
"file": "assets/app-4e969b65.css",
|
"file": "assets/app-15411b02.css",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"src": "resources/sass/app.scss"
|
"src": "resources/sass/app.scss"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user