1function profileActionConfirm(data) { 2 var title, icon; 3 var returnPage = "UserProfile"; 4 5 if (data[0] === 'true') title = 'Success', icon = 'far fa-check-square-circle'; 6 if (data[0] === 'false') title = 'Error', icon = 'fas fa-exclamation-triangle'; 7 if (data[2] === 'Index') returnPage = "Index"; 8 9 $.confirm({ 10 columnClass: 'small', 11 icon: icon, 12 title: title, 13 width: 500, 14 content: "<div class='alert alert-success' role='alert'>" + data[1] + "</div>", 15 buttons: { 16 OK: function () { 17 window.open("/UserAdmin/" + returnPage, "_self"); 18 } 19 } 20 }); 21} 22 23function closeProfileActionWindow(win) { 24 $('#' + win).data('kendoWindow').close(); 25} 26 27 28function openResetPasswordWindow(user, returnTo) { 29 var window = $("#ResetPasswordWindow").data("kendoWindow"); 30 var parms = {userName: user, returnTo: returnTo}; 31 32 window.refresh({ type: "GET", url: '/UserAdmin/ResetPassword', data: parms }); 33 window.center().open(); 34} 35 36function modifyPassword(user, returnTo) { 37 var validator = $("#formResetPassword").data("kendoValidator"); 38 var data = { 39 'UserName': user, 40 'ReturnTo': returnTo, 41 'Password': $("#formResetPassword").find("#password").val(), 42 'ConfirmPassword': $("#formResetPassword").find("#confirmPassword").val() 43 }; 44 45 if (validator.validate()) { 46 displayBusyIndicator(); 47 $.ajax({
48 url: '/UserAdmin/ResetPasswordByAdmin', 49 data: data, 50 type: 'PUT', 51 success: function (data) { 52 profileActionConfirm(data); 53 }, 54 error: function (jXhr) { 55 if (typeof console != 'undefined') 56 console.log(jXhr.responseText); 57 profileActionConfirm(jXhr.statusText); 58 }, 59 complete: function () { 60 hideBusyIndicator(); 61 } 62 }); 63 } 64} 65 66function showPassword(control) { 67 var x = document.getElementById(control); 68 if (x.type === "password") { 69 x.type = "text"; 70 $("#showHide" + control).html('<i class="fa-regular fa-eye"></i>'); 71 } else { 72 x.type = "password"; 73 $("#showHide" + control).html('<i class="fa-regular fa-eye-slash"></i>'); 74 } 75} 76 77// ****** Disable Two-Factor Authentication ****** 78 79function openDisable2FaWindow() { 80 var window = $("#Disable2FaWindow").data("kendoWindow"); 81 var parms = { userName: $("#addEditUserForm").find("#UserName").val() }; 82 83 window.refresh({ type: "GET", url: '/Account/Disable2Fa', data: parms }); 84 window.center().open(); 85} 86 87function disable2FaAction(user) { 88 var parm = { 89 'UserName': user 90 }; 91 92 displayBusyIndicator(); 93 94 $.ajax({
95 url: '/Account/Disable2FaAction', 96 data: parm, 97 type: 'POST', 98 success: function (data) { 99 $('#Disable2FaWindow').data('kendoWindow').close(); 100 101 disable2FaConfirm(data); 102 }, 103 error: function (jXhr) { 104 if (typeof console != 'undefined') 105 console.log(jXhr.responseText); 106 disable2FaConfirm(jXhr.statusText); 107 }, 108 complete: function () { 109 hideBusyIndicator(); 110 } 111 }); 112} 113 114function disable2FaConfirm(data) { 115 var title, icon; 116 if (data[0] === 'true') title = 'Success', icon = 'far fa-check-square-circle'; 117 if (data[0] === 'false') title = 'Error', icon = 'fas fa-exclamation-triangle'; 118 119 $.confirm({ 120 columnClass: 'small', 121 icon: icon, 122 title: title, 123 width: 500, 124 content: "<div class='alert alert-success' role='alert'>" + data[1] + "</div>", 125 buttons: { 126 OK: function () { 127 if (data[0] === 'true') { 128 $("#disableBtnContainer").hide(); 129 $('#TwoFactorEnabled').prop('checked', false); 130 } 131 } 132 } 133 }); 134} 135// ****** Reset Authenticator Key ****** 136function openResetAuthenticatorWindow() { 137 var window = $("#ResetAuthenticatorWindow").data("kendoWindow"); 138 window.refresh({ type: "GET", url: '/Account/ResetAuthenticator' }); 139 window.center().open(); 140} 141 142function resetAuthenticatorAction() { 143 var data = { 'message': 'resetAction' }; 144 145 displayBusyIndicator(); 146 $.ajax({
147 url: '/Account/ResetAuthenticator', 148 data: data, 149 type: 'POST', 150 success: function (data) { 151 profileActionConfirm(data); 152 }, 153 error: function (jXhr) { 154 if (typeof console != 'undefined') 155 console.log(jXhr.responseText); 156 profileActionConfirm(jXhr.statusText); 157 }, 158 complete: function () { 159 hideBusyIndicator(); 160 } 161 }); 162} 163 164// ****** Forget Browser ****** 165 166function forgetBrowserAction() { 167 var data = { 'message': 'forgetAction' }; 168 169 displayBusyIndicator(); 170 $.ajax({ 171 url: '/Account/ForgetBrowser', 172 data: data, 173 type: 'POST', 174 success: function (data) { 175 profileActionConfirm(data); 176 }, 177 error: function (jXhr) { 178 if (typeof console != 'undefined') 179 console.log(jXhr.responseText); 180 profileActionConfirm(jXhr.statusText); 181 }, 182 complete: function () { 183 hideBusyIndicator(); 184 } 185 }); 186} 187
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.