diff --git a/app/config/app.php b/app/config/app.php index e9d05dcb7..fa10ff058 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -351,49 +351,72 @@ /** * Configures logging options */ - 'Log' => [ - 'debug' => [ - 'className' => 'Cake\Log\Engine\FileLog', - 'path' => LOGS, - 'file' => 'debug', - 'url' => env('LOG_DEBUG_URL', null), - 'scopes' => false, - 'levels' => ['notice', 'info', 'debug'], - ], - 'error' => [ - 'className' => 'Cake\Log\Engine\FileLog', - 'path' => LOGS, - 'file' => 'error', - 'url' => env('LOG_ERROR_URL', null), - 'scopes' => false, - 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], - ], - // To enable this dedicated query log, you need set your datasource's log flag to true - 'queries' => [ - 'className' => 'Cake\Log\Engine\FileLog', - 'path' => LOGS, - 'file' => 'queries', - 'url' => env('LOG_QUERIES_URL', null), - 'scopes' => ['queriesLog'], - ], - // We define a trace level for what is really debugging, except debug level - // will write to stdout instead of the log when debug=true - 'trace' => [ - 'className' => 'Cake\Log\Engine\FileLog', - 'path' => LOGS, - 'file' => 'trace', - 'url' => env('LOG_TRACE_URL', null), - 'scopes' => ['trace'], - ], - // We define a rules level to record application rule execution - 'rule' => [ - 'className' => 'Cake\Log\Engine\FileLog', - 'path' => LOGS, - 'file' => 'rule', - 'url' => env('LOG_TRACE_URL', null), - 'scopes' => ['rule'], - ] - ], + 'Log' => null !== env('COMANAGE_REGISTRY_CONTAINER', null) + // Configuration for container deployments + ? [ + 'debug' => [ + 'className' => 'Cake\Log\Engine\ConsoleLog', + 'stream' => 'php://stdout', + 'outputAs' => 0, + 'scopes' => false, + 'levels' => ['notice', 'info', 'debug'], + ], + 'error' => [ + 'className' => 'Cake\Log\Engine\ConsoleLog', + 'stream' => 'php://stderr', + 'outputAs' => 0, + 'scopes' => false, + 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], + ], + 'queries' => [ + 'className' => 'Cake\Log\Engine\ConsoleLog', + 'stream' => 'php://stdout', + 'outputAs' => 0, + 'scopes' => ['queriesLog'] + ], + 'trace' => [ + 'className' => 'Cake\Log\Engine\ConsoleLog', + 'stream' => 'php://stdout', + 'outputAs' => 0, + 'scopes' => ['trace'], + ] + ] + // Configuration for tranditional deployments + : [ + 'debug' => [ + 'className' => 'Cake\Log\Engine\FileLog', + 'path' => LOGS, + 'file' => 'debug', + 'url' => env('LOG_DEBUG_URL', null), + 'scopes' => false, + 'levels' => ['notice', 'info', 'debug'], + ], + 'error' => [ + 'className' => 'Cake\Log\Engine\FileLog', + 'path' => LOGS, + 'file' => 'error', + 'url' => env('LOG_ERROR_URL', null), + 'scopes' => false, + 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], + ], + // To enable this dedicated query log, you need set your datasource's log flag to true + 'queries' => [ + 'className' => 'Cake\Log\Engine\FileLog', + 'path' => LOGS, + 'file' => 'queries', + 'url' => env('LOG_QUERIES_URL', null), + 'scopes' => ['queriesLog'], + ], + // We define a trace level for what is really debugging, except debug level + // will write to stdout instead of the log when debug=true + 'trace' => [ + 'className' => 'Cake\Log\Engine\FileLog', + 'path' => LOGS, + 'file' => 'trace', + 'url' => env('LOG_TRACE_URL', null), + 'scopes' => ['trace'], + ] + ], /** * Session configuration. diff --git a/app/resources/locales/en_US/field.po b/app/resources/locales/en_US/field.po index c11e25e06..0f88b28e3 100644 --- a/app/resources/locales/en_US/field.po +++ b/app/resources/locales/en_US/field.po @@ -315,6 +315,9 @@ msgstr "Limit Global Search Scope" msgid "CoSettings.search_global_limited_models.desc" msgstr "If true, Global Search will only search Names, Email Addresses, and Identifiers. This may result in faster searches for larger deployments." +msgid "format" +msgstr "format" + msgid "GroupMembers.source" msgstr "Membership Source" diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index 4cd7ed3a2..f129fe850 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -51,6 +51,12 @@ msgstr "Active, Cannot Be Disabled" msgid "plugin.inactive" msgstr "Inactive" +msgid "global.attribute.modal" +msgstr "Attribute Modal" + +msgid "global.attributes" +msgstr "Attributes" + msgid "global.records.none" msgstr "There are no records to display." diff --git a/app/resources/locales/en_US/menu.po b/app/resources/locales/en_US/menu.po index d15a079c4..c66dfff37 100644 --- a/app/resources/locales/en_US/menu.po +++ b/app/resources/locales/en_US/menu.po @@ -141,6 +141,9 @@ msgstr "All Groups" msgid "co.switch" msgstr "Switch CO" +msgid "menu.user" +msgstr "User Menu" + msgid "registries" msgstr "Available {0} Registries" diff --git a/app/src/Command/SetupCommand.php b/app/src/Command/SetupCommand.php index ee80da1ad..c6845e434 100644 --- a/app/src/Command/SetupCommand.php +++ b/app/src/Command/SetupCommand.php @@ -160,7 +160,7 @@ public function execute(Arguments $args, ConsoleIo $io) $person->person_roles = [$coTable->People->PersonRoles->newEntity([ 'affiliation_type_id' => $coTable->Types->getTypeId(coId: $co_id, - attribute: 'PersonRoles.affiliation', + attribute: 'PersonRoles.affiliation_type', value: 'staff'), 'title' => __d('command', 'se.person_role.title'), 'status' => SuspendableStatusEnum::Active diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index f88cd1eaa..fb3ffce55 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -173,6 +173,11 @@ public function beforeRender(\Cake\Event\EventInterface $event) { } $this->set('vv_template_path', $vv_template_path); + + // Check to see if the model names a specific layout + if(method_exists($table, "getLayout")) { + $this->viewBuilder()->setLayout($table->getLayout()); + } return parent::beforeRender($event); } diff --git a/app/src/Model/Table/AdHocAttributesTable.php b/app/src/Model/Table/AdHocAttributesTable.php index c0b95f022..d194d8a80 100644 --- a/app/src/Model/Table/AdHocAttributesTable.php +++ b/app/src/Model/Table/AdHocAttributesTable.php @@ -43,6 +43,26 @@ class AdHocAttributesTable extends Table { use \App\Lib\Traits\ValidationTrait; use \App\Lib\Traits\SearchFilterTrait; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/AddressesTable.php b/app/src/Model/Table/AddressesTable.php index e81d5e2f1..a49b0b39e 100644 --- a/app/src/Model/Table/AddressesTable.php +++ b/app/src/Model/Table/AddressesTable.php @@ -58,6 +58,26 @@ class AddressesTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/EmailAddressesTable.php b/app/src/Model/Table/EmailAddressesTable.php index c8a21fa54..52adb0068 100644 --- a/app/src/Model/Table/EmailAddressesTable.php +++ b/app/src/Model/Table/EmailAddressesTable.php @@ -59,6 +59,26 @@ class EmailAddressesTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/ExternalIdentitiesTable.php b/app/src/Model/Table/ExternalIdentitiesTable.php index 1694fd076..986300d14 100644 --- a/app/src/Model/Table/ExternalIdentitiesTable.php +++ b/app/src/Model/Table/ExternalIdentitiesTable.php @@ -110,14 +110,15 @@ public function initialize(array $config): void { // XXX does some of this stuff really belong in the controller? $this->setEditContains([ 'PrimaryName', -/* 'Addresses', + 'Addresses', 'AdHocAttributes', 'EmailAddresses', 'Identifiers', 'Names', - 'PersonRoles', + //'ExternalIdentityRoles', + 'Pronouns', 'TelephoneNumbers', - 'Urls'*/ + 'Urls' ]); $this->setIndexContains(['PrimaryName']); diff --git a/app/src/Model/Table/IdentifiersTable.php b/app/src/Model/Table/IdentifiersTable.php index 899ebefc6..e89ae4a97 100644 --- a/app/src/Model/Table/IdentifiersTable.php +++ b/app/src/Model/Table/IdentifiersTable.php @@ -71,6 +71,26 @@ class IdentifiersTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/NamesTable.php b/app/src/Model/Table/NamesTable.php index e748c622c..b0e5cace3 100644 --- a/app/src/Model/Table/NamesTable.php +++ b/app/src/Model/Table/NamesTable.php @@ -63,6 +63,26 @@ class NamesTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/PeopleTable.php b/app/src/Model/Table/PeopleTable.php index b925f728b..2f52a217d 100644 --- a/app/src/Model/Table/PeopleTable.php +++ b/app/src/Model/Table/PeopleTable.php @@ -136,7 +136,8 @@ public function initialize(array $config): void { 'EmailAddresses', 'Identifiers', 'Names', - 'PersonRoles', + //'PersonRoles', + 'Pronouns', 'TelephoneNumbers', 'Urls' ]); diff --git a/app/src/Model/Table/PronounsTable.php b/app/src/Model/Table/PronounsTable.php index 6f6fb511c..c1a74a567 100644 --- a/app/src/Model/Table/PronounsTable.php +++ b/app/src/Model/Table/PronounsTable.php @@ -54,6 +54,26 @@ class PronounsTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/TelephoneNumbersTable.php b/app/src/Model/Table/TelephoneNumbersTable.php index ca8022826..0854d7ed2 100644 --- a/app/src/Model/Table/TelephoneNumbersTable.php +++ b/app/src/Model/Table/TelephoneNumbersTable.php @@ -58,6 +58,26 @@ class TelephoneNumbersTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/Model/Table/UrlsTable.php b/app/src/Model/Table/UrlsTable.php index 1c446eca5..46f41c23f 100644 --- a/app/src/Model/Table/UrlsTable.php +++ b/app/src/Model/Table/UrlsTable.php @@ -54,6 +54,26 @@ class UrlsTable extends Table { ] ]; + /** + * Provide the default layout + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getLayout(): string { + return "iframe"; + } + + /** + * Provide the default redirect goal + * + * @since COmanage Registry v5.0.0 + * @return string Type of redirect + */ + public function getRedirectGoal(): string { + return "self"; + } + /** * Perform Cake Model initialization. * diff --git a/app/src/View/Helper/FieldHelper.php b/app/src/View/Helper/FieldHelper.php index da303680d..437e17575 100644 --- a/app/src/View/Helper/FieldHelper.php +++ b/app/src/View/Helper/FieldHelper.php @@ -102,6 +102,17 @@ public function control(string $fieldName, // Specify a class on the
  • form control wrapper $liClass = $cssClass; + + // Get the field type from the map of fields (e.g. 'boolean', 'string', 'timestamp') + $fieldMap = $this->getView()->get('vv_field_types'); + $fieldType = $fieldMap[$fieldName]; + + // Collect any supplemental markup and/or JavaScript to pass along for field construction. + // Suppliment is an array: supplement['beforeField' => 'string', 'afterField' => 'string']. + $fieldSupplement = !empty($config['supplement']) ? $config['supplement'] : []; + + // For special fields that should not include
  • {{ this.txt.unverified }} @@ -91,7 +94,7 @@ export default {
  • @@ -101,7 +104,7 @@ export default {
  • {{ this.mvea.tag }} @@ -111,7 +114,7 @@ export default {
  • - {{ this.mvea.room }} {{ this.mvea.street }} + {{ this.mvea.room }} {{ this.mvea.street }}
    {{ this.mvea.locality }}{{ this.mvea.locality != '' && this.mvea.state != '' ? ', ' : ''}}{{ this.mvea.state }}
    @@ -127,7 +130,7 @@ export default {
  • {{ this.mvea.type.display_name }} @@ -136,7 +139,7 @@ export default {
  • @@ -146,7 +149,7 @@ export default {
  • {{ this.mvea.type.display_name }} diff --git a/app/webroot/js/comanage/components/mvea/mvea-modal.js b/app/webroot/js/comanage/components/mvea/mvea-modal.js new file mode 100644 index 000000000..0977d3ae2 --- /dev/null +++ b/app/webroot/js/comanage/components/mvea/mvea-modal.js @@ -0,0 +1,49 @@ +/** + * COmanage Registry MVEA Modal JavaScript + * + * Portions licensed to the University Corporation for Advanced Internet + * Development, Inc. ("UCAID") under one or more contributor license agreements. + * See the NOTICE file distributed with this work for additional information + * regarding copyright ownership. + * + * UCAID licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @link https://www.internet2.edu/comanage COmanage Project + * @package registry + * @since COmanage Registry v5.0.0 + * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ + +export default { + props: { + modal: Object, + core: Object, + txt: Object + }, + template: ` +