//============================================================================== // // Purpose: Login support. // //============================================================================== /* eslint no-unused-vars: "off", eqeqeq: "off", no-useless-assignment: "off", no-empty: "off", no-dupe-else-if: "off", no-use-before-define: "off", no-eval: "off", no-alert: "off", no-global-assign: "off", no-self-assign: "off", no-useless-escape: "off", no-dupe-keys: "off", no-constant-condition: "off", no-unreachable: "off" */ /*global getObj consoleLog // ClientDialogs.js showDialogP cdBuildTextFieldRowP // RemoteScripting.js jsrsExecute // SharedFunctions.js htmlEncode // ShopSharedFullFunctions.js displayTimedMessage checkResponseForError // Common.js // ClientFunctions.js jsrsExecuteWithErrorP disableDialogButtons rsErrorCallbackShowErrorDialogAndRefresh hideDialog // Generated g_isMobile */ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ function didSignIn(json_, optionsHolder_) { window.location.reload(); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ function submitSignIn() { consoleLog('submitSignIn()'); consoleLog('loginform=' + getObj('loginform')); var theForm = getObj('loginform'), objEmail = theForm.user, strEmail = objEmail.value, objPW = theForm.pwd, strPW = objPW.value; alert('theForm.user=' + theForm.user); jsrsExecuteWithErrorP( 'Admin_signIn', // commandString_ didSignIn, // fnCallback_ 'Signing In', // doingWhat_ { userEmail: strEmail, userPW: strPW }); // payloadDocument_, options_ } /*----------------------------------------------------------------------------*/ /* function showSignIn() { var strFormId = 'frmLogin', strDialogInteriorRows = cdBuildTextFieldRowP( 'txtEmail', // fieldName_ 'Email Address', // fieldLabelHTML_ { }) + cdBuildTextFieldRowP( 'txtPassword', // fieldName_ 'Password', // fieldLabelHTML_ { isPasswordField: 1 }); showDialogP( strDialogInteriorRows, strFormId, { formTitle: 'Sign In to ShopaZulu', hideCancelButton: 1, focusFieldName: 'txtUserName', okButtonDisplayText: 'Sign In', contextDetailOrFnSubmit: { fnSubmit: submitSignIn } }); // options_ document.forms[strFormId].txtEmail.type = 'email'; } */