Skip to content

Commit 13103b9

Browse files
Update Index.cshtml
1 parent 6eefeec commit 13103b9

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

Modules/UserManager/Views/UserManage/Index.cshtml

+25-9
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@
197197
@if (@item.IsSuperUser == true)
198198
{
199199
<span class="fa fa-check yellowgreen mt1" aria-hidden="true"></span>
200-
<button class="AM-btn AM-btn-secondary AM-btn-sm impersonate-btn" data-userid="@item.UserId">
201-
<i class="fas fa-user-secret"></i> Impersonate
202-
</button>
203200
}
204201
else
205202
{
@@ -223,10 +220,11 @@
223220
</span>
224221
@if (ViewBag.IsCurrentUserSuperUser)
225222
{
226-
<a data-hint="Edit" class="AM-btn AM-btn-primary AM-btn-sm edit warning" href="@Url.Action("ImpersonateUser", "UserManage", new {ctl = "Edit", itemId = item.UserId})"
227-
data-toggle="tooltip" data-placement="top" title="Impersonate">
228-
<span class="fas fa-user-secret color-white" aria-hidden="true"></span>
229-
</a>
223+
<span id="dialogs-impersonate" class="dnnActions" style="display: initial;">
224+
<a data-hint="Delete" class="confirm AM-btn AM-btn-primary AM-btn-sm" data-placement="top" data-singleton="true" href="@Url.Action("ImpersonateUserById", "UserManage", new {itemId = item.UserId})">
225+
<span class="fas fa-eye color-white" aria-hidden="true"></span>
226+
</a>
227+
</span>
230228
}
231229
</td>
232230
</tr>
@@ -259,20 +257,38 @@
259257
var deleteText = '@DotNetNuke.Services.Localization.Localization.GetString("DeleteConfirmation.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Index.resx")';
260258
var deleteUnauthorizedText = '@DotNetNuke.Services.Localization.Localization.GetString("DeleteUnauthorized.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Index.resx")';
261259
var removeDeleteText = '@DotNetNuke.Services.Localization.Localization.GetString("RemoveDelete.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Index.resx")';
260+
var impersonateText = '@DotNetNuke.Services.Localization.Localization.GetString("Impersonate.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Impersonate.resx")';
261+
var impersonateAnotherUserAccountConfirmation = '@DotNetNuke.Services.Localization.Localization.GetString("ImpersonateAnotherUserAccountConfirmation.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Impersonate.resx")';
262+
var impersonateAnotherUserAccountConfirmationAlert = '@DotNetNuke.Services.Localization.Localization.GetString("ImpersonateAnotherUserAccountConfirmationAlert.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Impersonate.resx")';
263+
var areYouSure = '@DotNetNuke.Services.Localization.Localization.GetString("AreYouSure.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Impersonate.resx")';
264+
var cancel = '@DotNetNuke.Services.Localization.Localization.GetString("Cancel.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Shared.resx")';
265+
var deleteBtnText = '@DotNetNuke.Services.Localization.Localization.GetString("Delete.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Shared.resx")';
266+
262267
$(function () {
263268
$('.dropdown-toggle').dropdown();
264269
});
265270
266271
$(function () {
267272
$('#dialogs-delete .confirm').dnnConfirm({
268273
title: "",
269-
yesText: "Delete",
270-
noText: "Cancel",
274+
yesText: deleteBtnText,
275+
noText: cancel,
271276
dialogClass: 'dnnFormPopup',
272277
text: '<p style="font-size:20px;">' + deleteText + '</p>',
273278
});
274279
});
275280
281+
$(function () {
282+
$('#dialogs-impersonate .confirm').dnnConfirm({
283+
title: areYouSure,
284+
yesText: impersonateText,
285+
noText: cancel,
286+
dialogClass: 'dnnFormPopup',
287+
width: 700,
288+
text: '<div class="admin-manager"> <div class="red"> <p>' + impersonateAnotherUserAccountConfirmation + '</p>' + '<p>' + impersonateAnotherUserAccountConfirmationAlert + '</p> </div> </div>',
289+
});
290+
});
291+
276292
$(function () {
277293
$('#dialogs-DeleteUnauthorized .confirm').dnnConfirm({
278294
title: "",

0 commit comments

Comments
 (0)