|
197 | 197 | @if (@item.IsSuperUser == true)
|
198 | 198 | {
|
199 | 199 | <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> |
203 | 200 | }
|
204 | 201 | else
|
205 | 202 | {
|
|
223 | 220 | </span>
|
224 | 221 | @if (ViewBag.IsCurrentUserSuperUser)
|
225 | 222 | {
|
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> |
230 | 228 | }
|
231 | 229 | </td>
|
232 | 230 | </tr>
|
|
259 | 257 | var deleteText = '@DotNetNuke.Services.Localization.Localization.GetString("DeleteConfirmation.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Index.resx")';
|
260 | 258 | var deleteUnauthorizedText = '@DotNetNuke.Services.Localization.Localization.GetString("DeleteUnauthorized.Text", "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Index.resx")';
|
261 | 259 | 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 | +
|
262 | 267 | $(function () {
|
263 | 268 | $('.dropdown-toggle').dropdown();
|
264 | 269 | });
|
265 | 270 |
|
266 | 271 | $(function () {
|
267 | 272 | $('#dialogs-delete .confirm').dnnConfirm({
|
268 | 273 | title: "",
|
269 |
| - yesText: "Delete", |
270 |
| - noText: "Cancel", |
| 274 | + yesText: deleteBtnText, |
| 275 | + noText: cancel, |
271 | 276 | dialogClass: 'dnnFormPopup',
|
272 | 277 | text: '<p style="font-size:20px;">' + deleteText + '</p>',
|
273 | 278 | });
|
274 | 279 | });
|
275 | 280 |
|
| 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 | +
|
276 | 292 | $(function () {
|
277 | 293 | $('#dialogs-DeleteUnauthorized .confirm').dnnConfirm({
|
278 | 294 | title: "",
|
|
0 commit comments