diff --git a/templates/Users/add.php b/templates/Users/add.php index 99bf366..f215277 100644 --- a/templates/Users/add.php +++ b/templates/Users/add.php @@ -14,6 +14,12 @@ 'field' => 'username', 'autocomplete' => 'off' ], + [ + 'field' => 'organisation_id', + 'type' => 'dropdown', + 'label' => __('Associated organisation'), + 'options' => $dropdownData['organisation'] + ], [ 'field' => 'password', 'label' => __('Password'), diff --git a/templates/Users/index.php b/templates/Users/index.php index 64561a1..1ff36bf 100644 --- a/templates/Users/index.php +++ b/templates/Users/index.php @@ -51,6 +51,13 @@ echo $this->element('genericElements/IndexTable/index_table', [ 'sort' => 'username', 'data_path' => 'username', ], + [ + 'name' => __('Organisation'), + 'sort' => 'organisation.name', + 'data_path' => 'organisation.name', + 'url' => '/organisations/view/{{0}}', + 'url_vars' => ['organisation.id'] + ], [ 'name' => __('Email'), 'sort' => 'individual.email', diff --git a/templates/Users/view.php b/templates/Users/view.php index 760ead4..26c3c25 100644 --- a/templates/Users/view.php +++ b/templates/Users/view.php @@ -21,6 +21,14 @@ echo $this->element( 'path' => 'individual.email' ], [ + 'type' => 'generic', + 'key' => __('Organisation'), + 'path' => 'organisation.name', + 'url' => '/organisations/view/{{0}}', + 'url_vars' => 'organisation.id' + ], + [ + 'type' => 'generic', 'key' => __('Role'), 'path' => 'role.name', 'url' => '/roles/view/{{0}}',