2020-06-19 00:42:10 +02:00
|
|
|
<?php
|
|
|
|
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.'),
|
|
|
|
'model' => 'Roles',
|
|
|
|
'fields' => [
|
|
|
|
[
|
|
|
|
'field' => 'individual_id',
|
|
|
|
'type' => 'dropdown',
|
|
|
|
'label' => __('Associated individual'),
|
|
|
|
'options' => $dropdownData['individual']
|
|
|
|
],
|
|
|
|
[
|
2020-11-06 09:21:44 +01:00
|
|
|
'field' => 'username',
|
|
|
|
'autocomplete' => 'off'
|
2020-06-19 00:42:10 +02:00
|
|
|
],
|
2021-11-24 01:25:57 +01:00
|
|
|
[
|
|
|
|
'field' => 'organisation_id',
|
|
|
|
'type' => 'dropdown',
|
|
|
|
'label' => __('Associated organisation'),
|
|
|
|
'options' => $dropdownData['organisation']
|
|
|
|
],
|
2020-06-19 00:42:10 +02:00
|
|
|
[
|
|
|
|
'field' => 'password',
|
2020-06-25 02:11:56 +02:00
|
|
|
'label' => __('Password'),
|
2020-11-05 10:21:57 +01:00
|
|
|
'type' => 'password',
|
2020-11-06 09:21:44 +01:00
|
|
|
'required' => $this->request->getParam('action') === 'add' ? 'required' : false,
|
|
|
|
'autocomplete' => 'new-password'
|
2020-06-19 00:42:10 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'field' => 'confirm_password',
|
2020-06-25 02:11:56 +02:00
|
|
|
'label' => __('Confirm Password'),
|
2020-11-05 10:21:57 +01:00
|
|
|
'type' => 'password',
|
2020-11-06 09:21:44 +01:00
|
|
|
'required' => $this->request->getParam('action') === 'add' ? 'required' : false,
|
|
|
|
'autocomplete' => 'off'
|
2020-06-19 00:42:10 +02:00
|
|
|
],
|
2020-06-21 21:27:11 +02:00
|
|
|
[
|
|
|
|
'field' => 'role_id',
|
|
|
|
'type' => 'dropdown',
|
|
|
|
'label' => __('Role'),
|
|
|
|
'options' => $dropdownData['role']
|
|
|
|
],
|
2020-06-19 00:42:10 +02:00
|
|
|
[
|
|
|
|
'field' => 'disabled',
|
|
|
|
'type' => 'checkbox',
|
|
|
|
'label' => 'Disable'
|
|
|
|
]
|
|
|
|
],
|
|
|
|
'submit' => [
|
|
|
|
'action' => $this->request->getParam('action')
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
</div>
|