Skip to content

Commit

Permalink
[BP] Fix error on edit page elements with non-unique id #gnRemoteReco…
Browse files Browse the repository at this point in the history
…rdUrl (#7621)
  • Loading branch information
ianwallen committed Jan 17, 2024
1 parent c4a35bc commit 2f7e59a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@
scope.isRemoteRecordPropertiesExtracted = false;
scope.selectionList = undefined;

// Get the parent div's ID
scope.popupId = element.closest(".onlinesrc-popup").attr("id");

scope.$on("resetSearch", function (event, args) {
scope.remoteRecord = {
remoteUrl: "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<div data-ng-if="allowRemoteRecordLink">
<form class="form-horizontal">
<div class="form-group">
<label for="gnRemoteRecordUrl" class="control-label col-sm-2" data-translate=""
<label
ng-attr-for="{{ 'gnRemoteRecordUrl' + popupId }}"
class="control-label col-sm-2"
data-translate=""
>orUseRemoteRecordUrl</label
>
<div class="col-sm-10">
<div class="input-group">
<input
class="form-control"
placeholder="https://catalog.sdi.org/csw?REQUEST=GetRecordById&..."
id="gnRemoteRecordUrl"
ng-attr-id="{{ 'gnRemoteRecordUrl' + popupId }}"
autocomplete="off"
data-ng-model="remoteRecord.remoteUrl"
data-ng-model-options="{debounce: 300}"
Expand Down

0 comments on commit 2f7e59a

Please sign in to comment.