{"version":3,"sources":["webpack:///login-bundle.js","webpack:///./Content/js/login/login.js"],"names":["webpackJsonp","353","module","exports","__webpack_require__","$","showLoginPage","hide","show","val","showRegisterPage","showForgotPasswordPage","clickedLogin","DisplayStatusMessage","clickedRegister","valid","clickedChangePassword","submitForgotPassword","sMessage","bDisplay","sTitle","bShowButton","text","modal","backdrop","keyboard","div","firstChild","nodeValue","setDisplayMessageText","clearErrorMessage","entity","errorMessage","ajaxRequest","type","url","data","dataType","sendData","toJson","options","contentType","cache","antiForgeryToken","__RequestVerificationToken","ajax","window","submit","this","serialize","action","method","success","result","error","textStatus","errorThrown","status","call"],"mappings":"AAAAA,cAAc,IAERC,IACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GCNrC,QAASC,KAGPD,EAAE,iBAAiBE,OACnBF,EAAE,uBAAuBE,OACzBF,EAAE,cAAcG,OAEhBH,EAAE,qBAAqBE,OACvBF,EAAE,mBAAmBI,IAAI,IACzBJ,EAAE,gBAAgBI,IAAI,IAIxB,QAASC,KAGPL,EAAE,iBAAiBG,OACnBH,EAAE,uBAAuBE,OACzBF,EAAE,cAAcE,OAIlB,QAASI,KAGPN,EAAE,iBAAiBE,OACnBF,EAAE,uBAAuBG,OACzBH,EAAE,cAAcE,OAEhBF,EAAE,qBAAqBE,OAIzB,QAASK,KACPC,EAAqB,yDAAyD,GAOhF,QAASC,KACHT,EAAE,iBAAiBU,SACrBF,EAAqB,8BAA8B,GAKvD,QAASG,KACHX,EAAE,uBAAuBU,SAC3BF,EAAqB,sBAAsB,GA0C/C,QAASI,MA8BT,QAASJ,GAAqBK,EAAUC,EAAUC,EAAQC,GACxD,GAAIF,EAeF,GAZAd,EAAE,eAAeiB,KAAKJ,GACtBb,EAAE,YAAYkB,OACZC,SAAU,SACVC,UAAU,IAEZpB,EAAE,YAAYkB,MAAM,QAEhBF,EACFhB,EAAE,uBAAuBG,OAEzBH,EAAE,uBAAuBE,OAEvBa,EAAQ,CACV,GAAIM,GAAMrB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B,OAI5D","file":"login-bundle.js","sourcesContent":["webpackJsonp([9],{\n\n/***/ 353:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function($) {\n\nfunction showLoginPage() {\n //DisplayStatusMessage(\"Loging in to Aerosim Online Training\", true);\n\n $('#RegisterPage').hide();\n $('#ForgotPasswordPage').hide();\n $('#LoginPage').show();\n\n $('#login-validation').hide();\n $('#forgotUsername').val(\"\");\n $('#forgotEmail').val(\"\");\n}\nwindow.showLoginPage = showLoginPage;\n\nfunction showRegisterPage() {\n //DisplayStatusMessage(\"Registering Serial Number\", true);\n\n $('#RegisterPage').show();\n $('#ForgotPasswordPage').hide();\n $('#LoginPage').hide();\n}\nwindow.showRegisterPage = showRegisterPage;\n\nfunction showForgotPasswordPage() {\n //DisplayStatusMessage(\"User information will be sent to the email address listed in our database.\", true);\n\n $('#RegisterPage').hide();\n $('#ForgotPasswordPage').show();\n $('#LoginPage').hide();\n\n $('#login-validation').hide();\n}\nwindow.showForgotPasswordPage = showForgotPasswordPage;\n\nfunction clickedLogin() {\n DisplayStatusMessage(\"Logging in to the Aerosim Learning Management System.\", true);\n // Need to store credentials in sessionStorage so they can be used \n //sessionStorage.setItem('flexPassthroughUN', $(\"#LoginUserName\").val());\n //sessionStorage.setItem('flexPassthroughPW', $(\"#LoginPassword\").val());\n}\nwindow.clickedLogin = clickedLogin;\n\nfunction clickedRegister() {\n if ($(\"#RegisterForm\").valid()) {\n DisplayStatusMessage(\"Registering serial number.\", true);\n }\n}\nwindow.clickedRegister = clickedRegister;\n\nfunction clickedChangePassword() {\n if ($(\"#ChangePasswordForm\").valid()) {\n DisplayStatusMessage(\"Changing Password.\", true);\n } else {}\n}\nwindow.clickedChangePassword = clickedChangePassword;\n\n$(function () {\n $('#forgotPasswordForm').submit(function () {\n var data = $(this).serialize();\n $.ajax({\n url: this.action,\n type: this.method,\n data: data,\n success: function success(result) {\n // The AJAX call succeeded and the server returned a JSON \n // with a property \"s\" => we can use this property\n // and set the html of the target div\n //$('#ShowResultHere').html(result.s);\n DisplayStatusMessage(\"If the data you entered is valid you will receive an email shortly with your Aerosim account information.\", true, \"Request Sent\", true);\n showLoginPage();\n },\n error: function error(_error, textStatus, errorThrown) {\n if (_error.status == 429) DisplayStatusMessage(\"Too many requests. Please wait 60 seconds before attempting a Password Reset again.\", true, \"Error\", true);else DisplayStatusMessage(\"There was an issue creating a Password Reset Request. Please try again or contact your training administrator.\", true, \"Error\", true);\n showLoginPage();\n }\n });\n // it is important to return false in order to \n // cancel the default submission of the form\n // and perform the AJAX call\n //DisplayStatusMessage(\"If the data you entered is valid you will receive an email shortly with your Aerosim account information.\", true, \"Request Sent\", true);\n //showLoginPage();\n\n return false;\n });\n});\n\n// Bizarrely, this function does nothing, the jQuery crap above is what runs after SUBMIT is clicked\n// on the forgot password view. -bep 2017 08 18 \nfunction submitForgotPassword() {\n //DisplayStatusMessage(\"If the data you entered is valid you will recieve an email shortly with your Aerosim account information.\", true, \"Request Sent\", true);\n //showLoginPage();\n}\nwindow.submitForgotPassword = submitForgotPassword;\n\n/*\r\n$(function () {\r\n $('#passwordResetForm').submit(function () {\r\n DisplayStatusMessage(\"Resetting Password\", true, \"Request Sent\", true);\r\n\r\n $.ajax({\r\n url: this.action,\r\n type: this.method,\r\n data: $(this).serialize(),\r\n success: function (result) {\r\n // The AJAX call succeeded and the server returned a JSON \r\n // with a property \"s\" => we can use this property\r\n // and set the html of the target div\r\n //$('#ShowResultHere').html(result.s);\r\n }\r\n });\r\n // it is important to return false in order to \r\n // cancel the default submission of the form\r\n // and perform the AJAX call\r\n return false;\r\n });\r\n});\r\n*/\n\nfunction DisplayStatusMessage(sMessage, bDisplay, sTitle, bShowButton) {\n if (bDisplay) {\n // display status message (sMessage)\n // Set modal text\n $('.modal-body').text(sMessage);\n $('#myModal').modal({\n backdrop: 'static',\n keyboard: false\n });\n $('#myModal').modal('show');\n\n if (bShowButton) $('#modalDismissButton').show();else $('#modalDismissButton').hide();\n\n if (sTitle) {\n var div = $('#myModalLabel')[0].firstChild;\n div.nodeValue = sTitle;\n } else {\n var div = $('#myModalLabel')[0].firstChild;\n div.nodeValue = \"Please Wait\";\n }\n } else {\n // hide status message\n $('#myModal').modal('hide');\n }\n}\nwindow.DisplayStatusMessage = DisplayStatusMessage;\n\nfunction setDisplayMessageText(sMessage) {\n $('.modal-body').text(sMessage);\n}\nwindow.setDisplayMessageText = setDisplayMessageText;\n\nfunction clearErrorMessage(entity) {\n entity.errorMessage(null);\n}\nwindow.clearErrorMessage = clearErrorMessage;\n\nfunction ajaxRequest(type, url, data, dataType) {\n // Ajax helper\n var sendData = data ? data.toJson ? data.toJson() : data : null;\n\n var options = {\n dataType: dataType || \"json\",\n contentType: \"application/json\",\n cache: false,\n type: type,\n data: sendData\n };\n\n var antiForgeryToken = $('input[name=\"__RequestVerificationToken\"]').val();\n if (antiForgeryToken) {\n options.data.__RequestVerificationToken = antiForgeryToken;\n }\n return $.ajax(url, options);\n}\nwindow.ajaxRequest = ajaxRequest;\n\n// routes\nfunction forgotPasswordUrl(id) {\n return lcms.baseUrl + \"Account/ForgotPassword\" + (id || \"\");\n}\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ })\n\n},[353]);\n\n\n// WEBPACK FOOTER //\n// login-bundle.js","function showLoginPage() {\r\n //DisplayStatusMessage(\"Loging in to Aerosim Online Training\", true);\r\n\r\n $('#RegisterPage').hide();\r\n $('#ForgotPasswordPage').hide();\r\n $('#LoginPage').show();\r\n\r\n $('#login-validation').hide();\r\n $('#forgotUsername').val(\"\");\r\n $('#forgotEmail').val(\"\");\r\n}\r\nwindow.showLoginPage = showLoginPage;\r\n\r\nfunction showRegisterPage() {\r\n //DisplayStatusMessage(\"Registering Serial Number\", true);\r\n\r\n $('#RegisterPage').show();\r\n $('#ForgotPasswordPage').hide();\r\n $('#LoginPage').hide();\r\n}\r\nwindow.showRegisterPage = showRegisterPage;\r\n\r\nfunction showForgotPasswordPage() {\r\n //DisplayStatusMessage(\"User information will be sent to the email address listed in our database.\", true);\r\n\r\n $('#RegisterPage').hide();\r\n $('#ForgotPasswordPage').show();\r\n $('#LoginPage').hide();\r\n\r\n $('#login-validation').hide();\r\n}\r\nwindow.showForgotPasswordPage = showForgotPasswordPage;\r\n\r\nfunction clickedLogin() {\r\n DisplayStatusMessage(\"Logging in to the Aerosim Learning Management System.\", true);\r\n // Need to store credentials in sessionStorage so they can be used \r\n //sessionStorage.setItem('flexPassthroughUN', $(\"#LoginUserName\").val());\r\n //sessionStorage.setItem('flexPassthroughPW', $(\"#LoginPassword\").val());\r\n}\r\nwindow.clickedLogin = clickedLogin;\r\n\r\nfunction clickedRegister() {\r\n if ($(\"#RegisterForm\").valid()) {\r\n DisplayStatusMessage(\"Registering serial number.\", true);\r\n }\r\n}\r\nwindow.clickedRegister = clickedRegister;\r\n\r\nfunction clickedChangePassword() {\r\n if ($(\"#ChangePasswordForm\").valid()) {\r\n DisplayStatusMessage(\"Changing Password.\", true);\r\n } else {\r\n\r\n }\r\n}\r\nwindow.clickedChangePassword = clickedChangePassword;\r\n\r\n$(function () {\r\n $('#forgotPasswordForm').submit(function () {\r\n var data = $(this).serialize()\r\n $.ajax({\r\n url: this.action,\r\n type: this.method,\r\n data: data,\r\n success: function (result) {\r\n // The AJAX call succeeded and the server returned a JSON \r\n // with a property \"s\" => we can use this property\r\n // and set the html of the target div\r\n //$('#ShowResultHere').html(result.s);\r\n DisplayStatusMessage(\"If the data you entered is valid you will receive an email shortly with your Aerosim account information.\", true, \"Request Sent\", true);\r\n showLoginPage();\r\n },\r\n error: function (error, textStatus, errorThrown) {\r\n if(error.status == 429)\r\n DisplayStatusMessage(\"Too many requests. Please wait 60 seconds before attempting a Password Reset again.\", true, \"Error\", true);\r\n else\r\n DisplayStatusMessage(\"There was an issue creating a Password Reset Request. Please try again or contact your training administrator.\", true, \"Error\", true);\r\n showLoginPage();\r\n }\r\n });\r\n // it is important to return false in order to \r\n // cancel the default submission of the form\r\n // and perform the AJAX call\r\n //DisplayStatusMessage(\"If the data you entered is valid you will receive an email shortly with your Aerosim account information.\", true, \"Request Sent\", true);\r\n //showLoginPage();\r\n\r\n return false;\r\n });\r\n});\r\n\r\n// Bizarrely, this function does nothing, the jQuery crap above is what runs after SUBMIT is clicked\r\n// on the forgot password view. -bep 2017 08 18 \r\nfunction submitForgotPassword() {\r\n //DisplayStatusMessage(\"If the data you entered is valid you will recieve an email shortly with your Aerosim account information.\", true, \"Request Sent\", true);\r\n //showLoginPage();\r\n}\r\nwindow.submitForgotPassword = submitForgotPassword;\r\n\r\n/*\r\n$(function () {\r\n $('#passwordResetForm').submit(function () {\r\n DisplayStatusMessage(\"Resetting Password\", true, \"Request Sent\", true);\r\n\r\n $.ajax({\r\n url: this.action,\r\n type: this.method,\r\n data: $(this).serialize(),\r\n success: function (result) {\r\n // The AJAX call succeeded and the server returned a JSON \r\n // with a property \"s\" => we can use this property\r\n // and set the html of the target div\r\n //$('#ShowResultHere').html(result.s);\r\n }\r\n });\r\n // it is important to return false in order to \r\n // cancel the default submission of the form\r\n // and perform the AJAX call\r\n return false;\r\n });\r\n});\r\n*/\r\n\r\nfunction DisplayStatusMessage(sMessage, bDisplay, sTitle, bShowButton) {\r\n if (bDisplay) {\r\n // display status message (sMessage)\r\n // Set modal text\r\n $('.modal-body').text(sMessage);\r\n $('#myModal').modal({\r\n backdrop: 'static',\r\n keyboard: false\r\n });\r\n $('#myModal').modal('show');\r\n\r\n if (bShowButton)\r\n $('#modalDismissButton').show();\r\n else\r\n $('#modalDismissButton').hide();\r\n\r\n if (sTitle) {\r\n var div = $('#myModalLabel')[0].firstChild;\r\n div.nodeValue = sTitle;\r\n }\r\n else {\r\n var div = $('#myModalLabel')[0].firstChild;\r\n div.nodeValue = \"Please Wait\";\r\n }\r\n\r\n }\r\n else {\r\n // hide status message\r\n $('#myModal').modal('hide');\r\n }\r\n}\r\nwindow.DisplayStatusMessage = DisplayStatusMessage;\r\n\r\nfunction setDisplayMessageText(sMessage) {\r\n $('.modal-body').text(sMessage);\r\n}\r\nwindow.setDisplayMessageText = setDisplayMessageText;\r\n\r\nfunction clearErrorMessage(entity) { entity.errorMessage(null); }\r\nwindow.clearErrorMessage = clearErrorMessage;\r\n\r\nfunction ajaxRequest(type, url, data, dataType) { // Ajax helper\r\n var sendData = data ? data.toJson ? data.toJson() : data : null;\r\n\r\n var options = {\r\n dataType: dataType || \"json\",\r\n contentType: \"application/json\",\r\n cache: false,\r\n type: type,\r\n data: sendData\r\n };\r\n\r\n var antiForgeryToken = $('input[name=\"__RequestVerificationToken\"]').val();\r\n if (antiForgeryToken) {\r\n options.data.__RequestVerificationToken = antiForgeryToken;\r\n }\r\n return $.ajax(url, options);\r\n}\r\nwindow.ajaxRequest = ajaxRequest;\r\n\r\n// routes\r\nfunction forgotPasswordUrl(id) { return lcms.baseUrl + \"Account/ForgotPassword\" + (id || \"\"); }\r\n\n\n\n// WEBPACK FOOTER //\n// ./Content/js/login/login.js"],"sourceRoot":""}