chg: [templates] for user creation now have a minimalist individiual creation included

pull/92/head
iglocska 2022-02-24 13:48:10 +01:00
parent 304586ff19
commit 678ad0fe8e
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 29 additions and 0 deletions

View File

@ -1,4 +1,7 @@
<?php
if ($this->request->getParam('action') === 'add') {
$dropdownData['individual'] = ['new' => __('New individual')] + $dropdownData['individual'];
}
echo $this->element('genericElements/Form/genericForm', [
'data' => [
'description' => __('Roles define global rules for a set of users, including first and foremost access controls to certain functionalities.'),
@ -10,6 +13,32 @@
'label' => __('Associated individual'),
'options' => $dropdownData['individual']
],
[
'field' => 'individual.email',
'stateDependence' => [
'source' => '#individual_id-field',
'option' => 'new'
],
'required' => false
],
[
'field' => 'individual.first_name',
'label' => 'First name',
'stateDependence' => [
'source' => '#individual_id-field',
'option' => 'new'
],
'required' => false
],
[
'field' => 'individual.last_name',
'label' => 'Last name',
'stateDependence' => [
'source' => '#individual_id-field',
'option' => 'new'
],
'required' => false
],
[
'field' => 'username',
'autocomplete' => 'off'