diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index b9547d811..f74bf8220 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -87,6 +87,12 @@ msgstr "Attribute Modal" msgid "global.attributes" msgstr "Attributes" +msgid "global.attributes.none" +msgstr "There are no attributes of this type" + +msgid "global.processing" +msgstr "processing..." + msgid "global.records.none" msgstr "There are no records to display." diff --git a/app/resources/locales/en_US/operation.po b/app/resources/locales/en_US/operation.po index 5be0470ee..586b12e1c 100644 --- a/app/resources/locales/en_US/operation.po +++ b/app/resources/locales/en_US/operation.po @@ -36,6 +36,9 @@ msgstr "Add" msgid "add.a" msgstr "Add a New {0}" +msgid "add.attribute" +msgstr "Add Attribute" + msgid "add.member" msgstr "Add member: " diff --git a/app/resources/locales/en_US/result.po b/app/resources/locales/en_US/result.po index c0aa9e347..5e5a9b029 100644 --- a/app/resources/locales/en_US/result.po +++ b/app/resources/locales/en_US/result.po @@ -30,6 +30,9 @@ msgstr "{0} Activated" msgid "added.mvea" msgstr "{0} {1} Added: {2}" +msgid "AdHocAttribute.deleted" +msgstr "Ad hoc attribute deleted" + msgid "applied.schema" msgstr "Successfully applied database schema" @@ -40,14 +43,17 @@ msgid "deleted" msgstr "Deleted" msgid "deleted.a" -msgstr "{0} Deleted" +msgstr "{0} deleted" msgid "deleted.mvea" -msgstr "{0} {1} Deleted: {2}" +msgstr "{0} {1} deleted: {2}" msgid "edited.mvea" msgstr "{0} {1} Edited: {2}" +msgid "EmailAddress.deleted" +msgstr "Email address deleted" + msgid "EmailAddresses.verify.forced" msgstr "Email Address force verified" @@ -81,6 +87,9 @@ msgstr "Added {0} to group {1} via nesting of group {2} ({3})" msgid "GroupMembers.deleted" msgstr "Removed {0} from group {1}" +msgid "GroupMember.deleted" +msgstr "Removed member from group" + msgid "GroupMembers.deleted.nesting" msgstr "Removed {0} from group {1} via nesting of group {2} ({3})" @@ -196,6 +205,9 @@ msgstr "Search Results" msgid "search.retry" msgstr "Please select an option from a menu, or try your search again." +msgid "TelephoneNumber.deleted" +msgstr "Telephone number deleted" + # These are specifically for test command msgid "test.database.ok" msgstr "Database connection established" diff --git a/app/src/Controller/AppController.php b/app/src/Controller/AppController.php index 35b51d485..f2f049923 100644 --- a/app/src/Controller/AppController.php +++ b/app/src/Controller/AppController.php @@ -362,7 +362,8 @@ protected function primaryLinkLookup(): void // At the end we need to have a Primary Link if(empty($this->cur_pl->value) - && !$this->$modelsName->allowEmptyPrimaryLink($this->request->getParam('action'))) { + && !$this->$modelsName->allowEmptyPrimaryLink($this->request->getParam('action')) + && $this->request->getParam('action') != 'deleted') { throw new \RuntimeException(__d('error', 'primary_link')); } } @@ -531,7 +532,7 @@ protected function populateAvailableCos() { */ protected function setCO() { - if($this->cur_co) { + if($this->cur_co || $this->request->getParam('action') == 'deleted') { // Nothing to do... return; } diff --git a/app/src/Controller/GroupMembersController.php b/app/src/Controller/GroupMembersController.php index b258d32db..9519a9815 100644 --- a/app/src/Controller/GroupMembersController.php +++ b/app/src/Controller/GroupMembersController.php @@ -84,4 +84,20 @@ public function add() { return parent::add(); } + + /** + * Handle the deleted action for a Group Member. + * This is used to set a flash message and override the target window. + * + * @since COmanage Registry v5.0.0 + */ + + public function deleted() { + // Add a flash message + $this->Flash->information(__d('result','GroupMember.deleted')); + // Set the target window + $this->set('vv_target_window', 'top'); + + return parent::deleted(); + } } \ No newline at end of file diff --git a/app/src/Controller/MVEAController.php b/app/src/Controller/MVEAController.php index aedda6a3c..52fb641c7 100644 --- a/app/src/Controller/MVEAController.php +++ b/app/src/Controller/MVEAController.php @@ -48,7 +48,7 @@ public function beforeFilter(\Cake\Event\EventInterface $event) { // $this->name = Models $modelsName = $this->name; - if(!$this->request->is('restful')) { + if(!$this->request->is('restful') && $this->request->getParam('action') != 'deleted') { // Provide additional hints to BreadcrumbsComponent. This needs to be here // and not in beforeRender because the component beforeRender will run first. @@ -143,7 +143,7 @@ public function beforeRender(\Cake\Event\EventInterface $event) { // field = model (or model_name) $fieldName = Inflector::underscore(Inflector::singularize($modelsName)); - if(!$this->request->is('restful')) { + if(!$this->request->is('restful') && $this->request->getParam('action') != 'deleted') { // If there is a default type setting for this model, pass it to the view if($this->$modelsName->getSchema()->hasColumn('type_id')) { $defaultTypeField = "default_" . $fieldName . "_type_id"; diff --git a/app/src/Controller/NamesController.php b/app/src/Controller/NamesController.php index d4dc3b604..f56b5e789 100644 --- a/app/src/Controller/NamesController.php +++ b/app/src/Controller/NamesController.php @@ -50,7 +50,7 @@ class NamesController extends MVEAController { */ public function beforeRender(\Cake\Event\EventInterface $event) { - if(!$this->request->is('restful')) { + if(!$this->request->is('restful') && $this->request->getParam('action') != 'deleted') { // Get the set of permitted name fields to pass to the view. // (We don't need required name fields since FormHelper will handle that.) diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index c6f2c3ef1..d09a355f6 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -33,6 +33,7 @@ use Cake\ORM\TableRegistry; use InvalidArgumentException; use \Cake\Http\Exception\BadRequestException; +use Cake\Utility\Inflector; use \App\Lib\Enum\ProvisioningContextEnum; use \App\Lib\Enum\SuspendableStatusEnum; use \App\Lib\Util\{StringUtilities, FunctionUtilities}; @@ -169,8 +170,10 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $table = $this->$modelsName; // Provide some hints to the views - $this->getFieldTypes(); - $this->getRequiredFields(); + if($this->request->getParam('action') != 'deleted') { + $this->getFieldTypes(); + $this->getRequiredFields(); + } // Set the display field as a view var to make it available to the views $this->set('vv_display_field', $table->getDisplayField()); @@ -307,6 +310,34 @@ public function delete($id) { return $this->redirect(['action' => 'edit', $id]); } + /** + * Handle a deleted action for a Standard object. + * + * @since COmanage Registry v5.0.0 + */ + + public function deleted() { + // Set the title when not set at the individual controller + if(empty($this->viewBuilder()->getVar('vv_title'))) { + $modelsName = $this->name; + $fieldName = Inflector::singularize($modelsName); + if(__d('result', $fieldName . '.deleted') != $fieldName . '.deleted') { + // Use the standard (singular) deleted message for the field when it exists + $this->set('vv_title', __d('result', $fieldName . '.deleted')); + } else { + // Build the result from the generic 'deleted.a' language key + $this->set('vv_title', __d('result', 'deleted.a', [$fieldName])); + } + } + // Set the target window when not set at the individual controller. + // This should be 'self' (default) or 'top'. + if (empty($this->viewBuilder()->getVar('vv_target_window'))) { + $this->set('vv_target_window', 'self'); + } + // Render the view + $this->render('/Standard/deleted'); + } + /** * Handle an edit action for a Standard object. * @@ -451,8 +482,11 @@ public function generateRedirect($entity) { $redirectGoal = 'index'; } } - - if($redirectGoal == 'self' + + if($redirectGoal == 'deleted') { + // Immediately redirect to the (mostly blank) deleted view + return $this->redirect(['action' => 'deleted']); + } elseif($redirectGoal == 'self' && $entity && in_array($this->request->getParam('action'), ['add', 'edit'])) { // We typically want to redirect to the edit view of the record, diff --git a/app/src/Controller/TelephoneNumbersController.php b/app/src/Controller/TelephoneNumbersController.php index 9d867600b..25227cd6c 100644 --- a/app/src/Controller/TelephoneNumbersController.php +++ b/app/src/Controller/TelephoneNumbersController.php @@ -49,7 +49,7 @@ class TelephoneNumbersController extends MVEAController { */ public function beforeRender(\Cake\Event\EventInterface $event) { - if(!$this->request->is('restful')) { + if(!$this->request->is('restful') && $this->request->getParam('action') != 'deleted') { $CoSettings = TableRegistry::getTableLocator()->get('CoSettings'); $settings = $CoSettings->find()->where(['co_id' => $this->getCOID()])->firstOrFail(); diff --git a/app/src/Lib/Traits/PrimaryLinkTrait.php b/app/src/Lib/Traits/PrimaryLinkTrait.php index 41e4751e6..32bce696c 100644 --- a/app/src/Lib/Traits/PrimaryLinkTrait.php +++ b/app/src/Lib/Traits/PrimaryLinkTrait.php @@ -525,7 +525,7 @@ public function setPrimaryLink($fields) { */ public function setRedirectGoal(string $goal, string $action='*') { - if(!in_array($goal, ['index', 'pluggableLink', 'primaryLink', 'self', 'special'])) { + if(!in_array($goal, ['deleted', 'index', 'pluggableLink', 'primaryLink', 'self', 'special'])) { throw new \InvalidArgumentException(__d('error', 'invalid', [$goal])); } diff --git a/app/src/Model/Table/AdHocAttributesTable.php b/app/src/Model/Table/AdHocAttributesTable.php index e1092e6b9..dbf46c7cc 100644 --- a/app/src/Model/Table/AdHocAttributesTable.php +++ b/app/src/Model/Table/AdHocAttributesTable.php @@ -87,6 +87,7 @@ public function initialize(array $config): void { $this->setPrimaryLink(['external_identity_id', 'external_identity_role_id', 'person_id', 'person_role_id']); $this->setRequiresCO(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['unfreeze']); $this->setEditContains(['ExternalIdentities', 'ExternalIdentityRoles', 'SourceAdHocAttributes']); @@ -103,7 +104,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/Model/Table/AddressesTable.php b/app/src/Model/Table/AddressesTable.php index f1fc87173..34fb2b845 100644 --- a/app/src/Model/Table/AddressesTable.php +++ b/app/src/Model/Table/AddressesTable.php @@ -104,6 +104,7 @@ public function initialize(array $config): void { // Models that AcceptCoId should be expicitly added to StandardApiController::initialize() $this->setAcceptsCoId(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['unfreeze']); $this->setEditContains(['ExternalIdentities', 'ExternalIdentityRoles', 'SourceAddresses']); @@ -131,7 +132,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/Model/Table/EmailAddressesTable.php b/app/src/Model/Table/EmailAddressesTable.php index baa6c77af..221e0875f 100644 --- a/app/src/Model/Table/EmailAddressesTable.php +++ b/app/src/Model/Table/EmailAddressesTable.php @@ -109,6 +109,7 @@ public function initialize(array $config): void { $this->setAllowLookupPrimaryLink(['primary']); $this->setRequiresCO(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['forceVerify', 'unfreeze']); $this->setEditContains(['ExternalIdentities', 'SourceEmailAddresses']); @@ -133,7 +134,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/Model/Table/GroupMembersTable.php b/app/src/Model/Table/GroupMembersTable.php index 3aaca7a71..4a3dcec40 100644 --- a/app/src/Model/Table/GroupMembersTable.php +++ b/app/src/Model/Table/GroupMembersTable.php @@ -62,7 +62,7 @@ class GroupMembersTable extends Table { */ public function getLayout(string $action = ''): string { return match($action) { - 'add','edit','view' => 'iframe', + 'add','edit','view','deleted' => 'iframe', default => 'default' }; } @@ -93,6 +93,7 @@ public function initialize(array $config): void { $this->setPrimaryLink(['group_id', 'person_id']); $this->setRequiresCO(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setEditContains(['Groups', 'People.PrimaryName']); $this->setViewContains(['Groups', 'People.PrimaryName']); @@ -125,7 +126,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); diff --git a/app/src/Model/Table/IdentifiersTable.php b/app/src/Model/Table/IdentifiersTable.php index ad916e28d..51a6a00b8 100644 --- a/app/src/Model/Table/IdentifiersTable.php +++ b/app/src/Model/Table/IdentifiersTable.php @@ -119,6 +119,7 @@ public function initialize(array $config): void { $this->setPrimaryLink(['external_identity_id', 'group_id', 'person_id']); $this->setRequiresCO(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['unfreeze']); $this->setEditContains(['ExternalIdentities', 'SourceIdentifiers']); @@ -146,7 +147,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ], // Related models whose permissions we'll need, typically for table views 'related' => [ diff --git a/app/src/Model/Table/NamesTable.php b/app/src/Model/Table/NamesTable.php index 6785ab3dc..d7ef0ee78 100644 --- a/app/src/Model/Table/NamesTable.php +++ b/app/src/Model/Table/NamesTable.php @@ -110,6 +110,7 @@ public function initialize(array $config): void { // Models that AcceptCoId should be explicitly added to StandardApiController::initialize() $this->setAcceptsCoId(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setEditContains(['ExternalIdentities', 'SourceNames']); $this->setAutoViewVars([ @@ -137,7 +138,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/Model/Table/PronounsTable.php b/app/src/Model/Table/PronounsTable.php index 82bb98c6a..52604ccd0 100644 --- a/app/src/Model/Table/PronounsTable.php +++ b/app/src/Model/Table/PronounsTable.php @@ -96,6 +96,7 @@ public function initialize(array $config): void { $this->setPrimaryLink(['external_identity_id', 'person_id']); $this->setRequiresCO(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['unfreeze']); $this->setEditContains(['ExternalIdentities', 'SourcePronouns']); @@ -123,7 +124,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/Model/Table/TelephoneNumbersTable.php b/app/src/Model/Table/TelephoneNumbersTable.php index 6f40d7ae6..64f77c08e 100644 --- a/app/src/Model/Table/TelephoneNumbersTable.php +++ b/app/src/Model/Table/TelephoneNumbersTable.php @@ -104,6 +104,7 @@ public function initialize(array $config): void { // Models that AcceptCoId should be expicitly added to StandardApiController::initialize() $this->setAcceptsCoId(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['unfreeze']); $this->setEditContains(['ExternalIdentities', 'ExternalIdentityRoles', 'SourceTelephoneNumbers']); @@ -128,7 +129,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/Model/Table/UrlsTable.php b/app/src/Model/Table/UrlsTable.php index eb6e53707..093249cfc 100644 --- a/app/src/Model/Table/UrlsTable.php +++ b/app/src/Model/Table/UrlsTable.php @@ -96,6 +96,7 @@ public function initialize(array $config): void { $this->setPrimaryLink(['external_identity_id', 'person_id']); $this->setRequiresCO(true); $this->setRedirectGoal('self'); + $this->setRedirectGoal(action: 'delete', goal: 'deleted'); $this->setAllowLookupPrimaryLink(['unfreeze']); $this->setEditContains(['ExternalIdentities', 'ExternalIdentityRoles', 'SourceUrls']); @@ -119,7 +120,8 @@ public function initialize(array $config): void { // Actions that operate over a table (ie: do not require an $id) 'table' => [ 'add' => ['platformAdmin', 'coAdmin'], - 'index' => ['platformAdmin', 'coAdmin'] + 'index' => ['platformAdmin', 'coAdmin'], + 'deleted' => ['platformAdmin', 'coAdmin'] ] ]); } diff --git a/app/src/View/Helper/VueHelper.php b/app/src/View/Helper/VueHelper.php index 2d3afa9e5..74c55a226 100644 --- a/app/src/View/Helper/VueHelper.php +++ b/app/src/View/Helper/VueHelper.php @@ -61,6 +61,7 @@ class VueHelper extends Helper { 'unverified' ], 'information' => [ + 'global.attributes.none', 'global.value.none', 'record', 'report.for', diff --git a/app/templates/EmailAddresses/fields-nav.inc b/app/templates/EmailAddresses/fields-nav.inc index 7ea3bbe8b..e0fb603e1 100644 --- a/app/templates/EmailAddresses/fields-nav.inc +++ b/app/templates/EmailAddresses/fields-nav.inc @@ -33,17 +33,19 @@ $subnav = [ 'active' => 'person', // default for person. 'external identities' are special cased 'subActive' => 'email_addresses' ]; - -$topLinks = [ - [ - 'icon' => 'verified_user', - 'order' => 'Default', - 'label' => __d('operation', 'EmailAddresses.verify.force'), - 'if' => 'notVerified', - 'link' => [ - 'action' => 'forceVerify', - $vv_obj->id + +if($vv_action != 'add') { + $topLinks = [ + [ + 'icon' => 'verified_user', + 'order' => 'Default', + 'label' => __d('operation', 'EmailAddresses.verify.force'), + 'if' => 'notVerified', + 'link' => [ + 'action' => 'forceVerify', + $vv_obj->id + ], + 'class' => '' ], - 'class' => '' - ], -]; \ No newline at end of file + ]; +} \ No newline at end of file diff --git a/app/templates/People/fields-nav.inc b/app/templates/People/fields-nav.inc index e572bde0c..fc6a19107 100644 --- a/app/templates/People/fields-nav.inc +++ b/app/templates/People/fields-nav.inc @@ -134,11 +134,6 @@ $addMenuLinks = [ 'icon' => 'contact_mail', 'iconClass' => 'material-icons-outlined' ], - [ - 'controller' => 'history_records', - 'action' => 'add', - 'icon' => 'history' - ], [ 'controller' => 'pronouns', 'action' => 'add', diff --git a/app/templates/Standard/deleted.php b/app/templates/Standard/deleted.php new file mode 100644 index 000000000..d8cf635b9 --- /dev/null +++ b/app/templates/Standard/deleted.php @@ -0,0 +1,81 @@ +name; +$tableName = \Cake\Utility\Inflector::tableize(\Cake\Utility\Inflector::singularize($this->name)); + +// $vv_template_path will be set for plugins +$templatePath = $vv_template_path ?? ROOT . DS . "templates" . DS . $modelsName; + +// The target window is set at the controller in $vv_target_window. +// The values should be 'self' or 'top'. It is defined here for clarity. +// If the value is set to 'top', this window will self-close and flash messages +// will be displayed in the main browser window. +$targetWindow = $vv_target_window ?? 'self'; +?> + + + + + +
+
+

+
+
+ + + +
+
+

+
+
+ + element('flash', $flashArgs); + ?> + + + + + diff --git a/app/templates/element/mveaCanvas.php b/app/templates/element/mveaCanvas.php index 61e30b6d0..2e5025039 100644 --- a/app/templates/element/mveaCanvas.php +++ b/app/templates/element/mveaCanvas.php @@ -36,7 +36,7 @@ $action_args = array(); $action_args['vv_attr_id'] = $objId; $action_args['vv_actions_type'] = 'mvea-add-menu'; - $action_args['vv_actions_title'] = __d('operation', 'add'); + $action_args['vv_actions_title'] = __d('operation', 'add.attribute'); $action_args['vv_actions_icon'] = 'add_circle'; $action_args['vv_actions_class'] = 'mvea-add-menu'; $actionOrderDefault = $this->Menu->getMenuOrder('Default'); diff --git a/app/templates/layout/iframe.php b/app/templates/layout/iframe.php index cfc37ce81..30ef44b24 100644 --- a/app/templates/layout/iframe.php +++ b/app/templates/layout/iframe.php @@ -144,10 +144,17 @@ $(document).keyup(function(e) { if (e.key === "Escape") { // If we're in a modal, dismiss it when the escape key is pressed - if(window.parent === top - && typeof window.parent.cmMveaModal !== 'undefined' - && typeof window.parent.cmMveaModal.hide === 'function') { - window.parent.cmMveaModal.hide(); + if(window.parent === top) { + // Test for the MVEA modal window + if(typeof window.parent.cmMveaModal !== 'undefined' + && typeof window.parent.cmMveaModal.hide === 'function') { + window.parent.cmMveaModal.hide(); + } + // Test for the generic modal window + if(typeof window.parent.cmModal !== 'undefined' + && typeof window.parent.cmModal.hide === 'function') { + window.parent.cmModal.hide(); + } } } }); diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index fc00bf520..07997bd8b 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -1815,6 +1815,9 @@ li[data-pc-section="emptymessage"] { .v-leave-to { opacity: 0; } +[v-cloak] { + display: none; +} /* ENTITY ID under each Edit/View Form/List */ #cm-entity-id { position: absolute; @@ -1837,6 +1840,12 @@ li[data-pc-section="emptymessage"] { border: 1px solid var(--cmg-color-bg-007); margin: 0; } +.btn.btn-primary.cm-deleted-close-button { + display: flex; + align-items: center; + gap: 0.25em; + margin: auto; +} /* MVEA & STANDARD MODAL */ .cm-modal .modal-header { padding: 0.5rem 1rem; diff --git a/app/webroot/js/comanage/comanage.js b/app/webroot/js/comanage/comanage.js index 2d599837c..619a6292a 100644 --- a/app/webroot/js/comanage/comanage.js +++ b/app/webroot/js/comanage/comanage.js @@ -180,7 +180,16 @@ function launchCmModal( $("#cm-modal").attr('data-reload-on-close', reloadOnClose); // Open the modal window - $("#cm-modal").modal('show'); + window.cmModal = new bootstrap.Modal(document.getElementById('cm-modal')); + window.cmModal.show(); +} + +/** + * COmanage Registry Modal Hider: + * function for hiding our modal windows from within a contained iframe. + */ +function hideCmModal() { + $("#cm-modal,#mvea-modal").modal('hide'); } // Generic goto page form handling for multi-page listings. diff --git a/app/webroot/js/comanage/components/mvea/mveas.js b/app/webroot/js/comanage/components/mvea/mveas.js index bd3a7bfa0..0f50bac7c 100644 --- a/app/webroot/js/comanage/components/mvea/mveas.js +++ b/app/webroot/js/comanage/components/mvea/mveas.js @@ -61,6 +61,9 @@ export default { v-for='mvea in mveaModel' :mvea="mvea"> +
  • +
    {{ this.txt['information.global.attributes.none'] }}
    +
  • ` } \ No newline at end of file