cerebrate/templates/Users/add.php

47 lines
1.7 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']
],
[
2020-06-21 21:27:11 +02:00
'field' => 'username'
2020-06-19 00:42:10 +02:00
],
[
'field' => 'password',
'label' => __('Password'),
'type' => 'password',
'required' => $this->request->getParam('action') === 'add' ? 'required' : false
2020-06-19 00:42:10 +02:00
],
[
'field' => 'confirm_password',
'label' => __('Confirm Password'),
'type' => 'password',
'required' => $this->request->getParam('action') === 'add' ? 'required' : false
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>