Added entity/searchdomain name to deletion confirmation warning for searchdomain and entity

This commit is contained in:
2025-12-21 14:17:02 +01:00
parent fbfaff2953
commit b5545bb5c8
3 changed files with 21 additions and 2 deletions

View File

@@ -18,4 +18,10 @@
<data name="InvalidCredentials" xml:space="preserve"> <data name="InvalidCredentials" xml:space="preserve">
<value>Ungültiger Benutzername oder Passwort.</value> <value>Ungültiger Benutzername oder Passwort.</value>
</data> </data>
<data name="GenericDeleteConfirmation" xml:space="preserve">
<value>Sind Sie sicher, dass Sie &lt;strong id="{0}"&gt;diese Entity&lt;/strong&gt; löschen wollen?</value>
</data>
<data name="IrreversibleActionWarning" xml:space="preserve">
<value>Diese Aktion kann nicht rückgängig gemacht werden.</value>
</data>
</root> </root>

View File

@@ -18,4 +18,10 @@
<data name="InvalidCredentials" xml:space="preserve"> <data name="InvalidCredentials" xml:space="preserve">
<value>Invalid credentials.</value> <value>Invalid credentials.</value>
</data> </data>
<data name="GenericDeleteConfirmation" xml:space="preserve">
<value>Are you sure you want to delete &lt;strong id="{0}"&gt;this entity&lt;/strong&gt;?</value>
</data>
<data name="IrreversibleActionWarning" xml:space="preserve">
<value>This action cannot be undone.</value>
</data>
</root> </root>

View File

@@ -275,7 +275,8 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>@T["Are you sure you want to delete this searchdomain? This action cannot be undone."]</p> <p>@Html.Raw(T["GenericDeleteConfirmation", "deleteSearchdomainConfirmationModalName"])</p>
<p>@T["IrreversibleActionWarning"]</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@@ -408,7 +409,8 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>@T["Are you sure you want to delete this entity? This action cannot be undone."]</p> <p>@Html.Raw(T["GenericDeleteConfirmation", "deleteEntityConfirmationModalName"])</p>
<p>@T["IrreversibleActionWarning"]</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@@ -475,6 +477,9 @@
document.getElementById('deleteSearchdomainModal') document.getElementById('deleteSearchdomainModal')
); );
modal.show(); modal.show();
let searchdomain = domains[getSelectedDomainKey()];
let deleteSearchdomainConfirmationModalName = document.getElementById('deleteSearchdomainConfirmationModalName');
deleteSearchdomainConfirmationModalName.textContent = searchdomain;
}); });
document document
.getElementById('searchdomainConfirmDelete') .getElementById('searchdomainConfirmDelete')
@@ -964,6 +969,8 @@
modal.show(); modal.show();
let entityConfirmDelete = document.getElementById('EntityConfirmDelete'); let entityConfirmDelete = document.getElementById('EntityConfirmDelete');
entityConfirmDelete.setAttribute('data-name', entity.Name); entityConfirmDelete.setAttribute('data-name', entity.Name);
let deleteEntityConfirmationModalName = document.getElementById('deleteEntityConfirmationModalName');
deleteEntityConfirmationModalName.textContent = entity.Name;
}); });
actionCell.appendChild(detailsButton); actionCell.appendChild(detailsButton);