From a4fa1194ec9b35f3409be002a0a4ef28f8c8da16 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Tue, 23 Jul 2024 18:41:18 +0300 Subject: [PATCH] Fix ExternalIdentitySource alert link to open in modal. Fixed modal links to open on target _top --- app/resources/locales/en_US/information.po | 7 +++-- .../ExternalIdentitySources/retrieve.php | 26 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index 85a1b293f..b661506a9 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -61,7 +61,10 @@ msgid "ExternalIdentitySources.records" msgstr "Source Records" msgid "ExternalIdentitySources.retrieve" -msgstr "This is the current record retrieved directly from the source. View the latest record cached by Registry." +msgstr "This is the current record retrieved directly from the source. {0}" + +msgid "ExternalIdentitySources.cached" +msgstr "View the latest record cached by Registry" msgid "ExternalIdentitySources.retrieve.notSynced" msgstr "This is the current record available directly from the source." @@ -70,7 +73,7 @@ msgid "ExternalIdentitySourceRecords.metadata" msgstr "Metadata" msgid "ExternalIdentitySourceRecords.view" -msgstr "This is the latest record from the source as cached by Registry. Retrieve the current record directly from the source." +msgstr "This is the latest record from the source as cached by Registry. Retrieve the current record directly from the source." msgid "ExternalIdentitySources.search.attrs.none" msgstr "The External Identity Source cannot be searched." diff --git a/app/templates/ExternalIdentitySources/retrieve.php b/app/templates/ExternalIdentitySources/retrieve.php index b9b61a094..b7c0cca94 100644 --- a/app/templates/ExternalIdentitySources/retrieve.php +++ b/app/templates/ExternalIdentitySources/retrieve.php @@ -94,18 +94,26 @@ id)) { + // Construct the link + $link = $this->Html->link( + __d('information', 'ExternalIdentitySources.cached'), + [ + 'controller' => 'ext-identity-source-records', + 'action' => 'view', + $vv_external_identity_record->id + ], + [ + 'class' => 'cm-modal-link nospin', + 'target' => '_top', + 'data-cm-modal-title' => __d('controller', 'ExtIdentitySourceRecords', 1) + ], + ); + + // Construct the message $noticeText = __d( 'information', 'ExternalIdentitySources.retrieve', - [ - $this->Url->build( - [ - 'controller' => 'ext-identity-source-records', - 'action' => 'view', - $vv_external_identity_record->id - ] - ) - ] + $link ); } ?>