cerebrate/templates/Users/add.php

57 lines
2.1 KiB
PHP
Raw Normal View History

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']
],
[
'field' => 'username',
'autocomplete' => 'off'
2020-06-19 00:42:10 +02:00
],
[
'field' => 'organisation_id',
'type' => 'dropdown',
'label' => __('Associated organisation'),
'options' => $dropdownData['organisation']
],
2020-06-19 00:42:10 +02:00
[
'field' => 'password',
'label' => __('Password'),
'type' => 'password',
'required' => $this->request->getParam('action') === 'add' ? 'required' : false,
2021-11-26 10:53:24 +01:00
'autocomplete' => 'new-password',
'value' => ''
2020-06-19 00:42:10 +02:00
],
[
'field' => 'confirm_password',
'label' => __('Confirm Password'),
'type' => 'password',
'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>