Skip to content

Commit

Permalink
Fix ExternalIdentitySource alert link to open in modal. Fixed modal l…
Browse files Browse the repository at this point in the history
…inks to open on target _top
  • Loading branch information
Ioannis committed Sep 4, 2024
1 parent bc13667 commit aca14f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
7 changes: 5 additions & 2 deletions app/resources/locales/en_US/information.po
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ msgid "ExternalIdentitySources.records"
msgstr "Source Records"

msgid "ExternalIdentitySources.retrieve"
msgstr "This is the current record retrieved directly from the source. <a href="{0}">View the latest record cached by Registry</a>."
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."
Expand All @@ -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. <a href="{0}">Retrieve the current record directly from the source</a>."
msgstr "This is the latest record from the source as cached by Registry. <a href="{0}" target="_top">Retrieve the current record directly from the source</a>."

msgid "ExternalIdentitySources.search.attrs.none"
msgstr "The External Identity Source cannot be searched."
Expand Down
26 changes: 17 additions & 9 deletions app/templates/ExternalIdentitySources/retrieve.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,26 @@
<?php
$noticeText = __d('information', 'ExternalIdentitySources.retrieve.notSynced');
if(!empty($vv_external_identity_record->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
);
}
?>
Expand Down

0 comments on commit aca14f7

Please sign in to comment.