update form validation for customers

Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
This commit is contained in:
Maurice Preuß (envoyr)
2022-12-27 15:21:53 +01:00
parent 03a39ca69f
commit 37980060ea
10 changed files with 70 additions and 39 deletions

View File

@@ -32,6 +32,7 @@ return [
'title' => lng('admin.customer_add'),
'image' => 'fa-solid fa-user-plus',
'self_overview' => ['section' => 'customers', 'page' => 'customers'],
'id' => 'customer_add',
'sections' => [
'section_a' => [
'title' => lng('admin.accountdata'),
@@ -108,19 +109,19 @@ return [
'label' => lng('customer.firstname'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company']
'mandatory' => true
],
'name' => [
'label' => lng('customer.lastname'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company']
'mandatory' => true
],
'company' => [
'label' => lng('customer.company'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['firstname', 'name']
'mandatory' => true
],
'street' => [
'label' => lng('customer.street'),

View File

@@ -32,6 +32,7 @@ return [
'title' => lng('admin.customer_edit'),
'image' => 'fa-solid fa-user-pen',
'self_overview' => ['section' => 'customers', 'page' => 'customers'],
'id' => 'customer_edit',
'sections' => [
'section_a' => [
'title' => lng('admin.accountdata'),
@@ -107,21 +108,21 @@ return [
'label' => lng('customer.firstname'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company'],
'mandatory' => true,
'value' => $result['firstname']
],
'name' => [
'label' => lng('customer.lastname'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company'],
'mandatory' => true,
'value' => $result['name']
],
'company' => [
'label' => lng('customer.company'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['firstname', 'name'],
'mandatory' => true,
'value' => $result['company']
],
'street' => [