clearify customer add/edit name/company requirements

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-12-06 16:25:33 +01:00
parent 4501eb2723
commit d7a2ec35cc
6 changed files with 56 additions and 25 deletions

View File

@@ -95,16 +95,6 @@ return [
'title' => lng('admin.contactdata'),
'image' => 'icons/user_add.png',
'fields' => [
'name' => [
'label' => lng('customer.name'),
'type' => 'text',
'mandatory_ex' => true
],
'firstname' => [
'label' => lng('customer.firstname'),
'type' => 'text',
'mandatory_ex' => true
],
'gender' => [
'label' => lng('gender.title'),
'type' => 'select',
@@ -114,10 +104,23 @@ return [
2 => lng('gender.female')
]
],
'firstname' => [
'label' => lng('customer.firstname'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company']
],
'name' => [
'label' => lng('customer.name'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company']
],
'company' => [
'label' => lng('customer.company'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => true
'mandatory_ex' => ['firstname', 'name']
],
'street' => [
'label' => lng('customer.street'),

View File

@@ -93,18 +93,6 @@ return [
'title' => lng('admin.contactdata'),
'image' => 'icons/user_edit.png',
'fields' => [
'name' => [
'label' => lng('customer.name'),
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['name']
],
'firstname' => [
'label' => lng('customer.firstname'),
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['firstname']
],
'gender' => [
'label' => lng('gender.title'),
'type' => 'select',
@@ -115,10 +103,25 @@ return [
],
'selected' => $result['gender']
],
'firstname' => [
'label' => lng('customer.firstname'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company'],
'value' => $result['firstname']
],
'name' => [
'label' => lng('customer.name'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => ['company'],
'value' => $result['name']
],
'company' => [
'label' => lng('customer.company'),
'desc' => lng('customer.nameorcompany_desc'),
'type' => 'text',
'mandatory_ex' => true,
'mandatory_ex' => ['firstname', 'name'],
'value' => $result['company']
],
'street' => [