From aca14f75b4d4a5965030bdb70a2081349eb0cd8d 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 ); } ?>