TimeTrex/interface/html5/dist/wizard-reset_password-ResetPasswordWizardController.bundle.js

1 line
16 KiB
JavaScript

"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-reset_password-ResetPasswordWizardController"],{3097:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ResetPasswordWizardController\": () => (/* binding */ ResetPasswordWizardController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ResetPasswordWizardController extends BaseWizardController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.wizard'\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.title = $.i18n._( 'Reset Password' );\n\t\tthis.steps = 1;\n\t\tthis.current_step = 1;\n\t\tif ( this.default_data && typeof this.default_data.api_class != 'undefined' ) {\n\t\t\tthis.api = this.default_data.api_class;\n\t\t} else {\n\t\t\tthis.api = TTAPI.APIAuthentication;\n\t\t}\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tsuper.render();\n\n\t\tthis.initCurrentStep();\n\t}\n\n\tbuildCurrentStepUI() {\n\n\t\tvar $this = this;\n\t\tthis.content_div.empty();\n\n\t\tthis.stepsWidgetDic[this.current_step] = {};\n\n\t\tswitch ( this.current_step ) {\n\t\t\tcase 1:\n\t\t\t\tvar label = this.getLabel();\n\t\t\t\t//Error: TypeError: this.default_data is null in interface/html5/framework/jquery.min.js?v=9.0.0-20151016-110437 line 2 > eval line 32\n\t\t\t\tlabel.text( this.default_data ? this.default_data.message : '' );\n\t\t\t\tthis.content_div.append( label );\n\n\t\t\t\tvar form_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tvar form_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tvar form_item_input_div = form_item.find( '.form-item-input-div' );\n\n\t\t\t\tvar user_name = this.getText();\n\n\t\t\t\tuser_name.text( this.default_data ? this.default_data.user_name : '' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'User Name' ) );\n\t\t\t\tform_item_input_div.append( user_name );\n\n\t\t\t\tthis.content_div.append( form_item );\n\n\t\t\t\tform_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tform_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tform_item_input_div = form_item.find( '.form-item-input-div' );\n\n\t\t\t\tvar current_password = this.getPasswordInput( 'current_password' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'Current Password' ) );\n\t\t\t\tform_item_input_div.append( current_password );\n\n\t\t\t\tthis.content_div.append( form_item );\n\n\t\t\t\tform_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tform_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tform_item_input_div = form_item.find( '.form-item-input-div' );\n\n\t\t\t\tvar new_password = this.getPasswordInput( 'new_password' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'New Password' ) );\n\t\t\t\tform_item_input_div.append( new_password );\n\n\t\t\t\tthis.content_div.append( form_item );\n\n\t\t\t\tform_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tform_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tform_item_input_div = form_item.find( '.form-item-input-div' );\n\n\t\t\t\tvar confirm_password = this.getPasswordInput( 'confirm_password' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'New Password (Confirm)' ) );\n\t\t\t\tform_item_input_div.append( confirm_password );\n\n\t\t\t\tthis.content_div.append( form_item );\n\n\t\t\t\tthis.stepsWidgetDic[this.current_step][current_password.getField()] = current_password;\n\t\t\t\tthis.stepsWidgetDic[this.current_step][new_password.getField()] = new_password;\n\t\t\t\tthis.stepsWidgetDic[this.current_step][confirm_password.getField()] = confirm_password;\n\n\t\t\t\tcurrent_password.focus();\n\n\t\t\t\tbreak;\n\n\t\t}\n\t}\n\n\tsaveCurrentStep() {\n\t\tthis.stepsDataDic[this.current_step] = {};\n\t\tvar current_step_data = this.stepsDataDic[this.current_step];\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\t\tswitch ( this.current_step ) {\n\t\t\tdefault:\n\n\t\t\t\tfor ( var key in current_step_ui ) {\n\t\t\t\t\tif ( !current_step_ui.hasOwnProperty( key ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrent_step_data[key] = current_step_ui[key].getValue();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tbuildCurrentStepData() {\n\t}\n\n\tonCloseClick() {\n\n\t\t$( this.el ).remove();\n\t\tLocalCacheData.current_open_wizard_controllers = LocalCacheData.current_open_wizard_controllers.filter( wizard => wizard.wizard_id !== this.wizard_id );\n\t\tLocalCacheData.extra_filter_for_next_open_view = null;\n\t}\n\n\tonDoneClick() {\n\n\t\tvar $this = this;\n\t\tsuper.onDoneClick();\n\t\tthis.saveCurrentStep();\n\n\t\tvar current_password = this.stepsDataDic[1].current_password;\n\t\tvar new_password = this.stepsDataDic[1].new_password;\n\t\tvar confirm_password = this.stepsDataDic[1].confirm_password;\n\n\t\tthis.stepsWidgetDic[1].current_password.clearErrorStyle();\n\t\tthis.stepsWidgetDic[1].new_password.clearErrorStyle();\n\t\tthis.stepsWidgetDic[1].confirm_password.clearErrorStyle();\n\n\t\tif ( !current_password ) {\n\t\t\tthis.stepsWidgetDic[1].current_password.setErrorStyle( $.i18n._( 'Current password can\\'t be empty' ), true );\n\t\t} else if ( !new_password ) {\n\t\t\tthis.stepsWidgetDic[1].new_password.setErrorStyle( $.i18n._( 'New password can\\'t be empty' ), true );\n\t\t} else if ( new_password !== confirm_password ) {\n\t\t\tthis.stepsWidgetDic[1].new_password.setErrorStyle( $.i18n._( 'New password does not match' ), true );\n\t\t} else {\n\t\t\tif ( !this.default_data || !this.default_data.user_name ) {\n\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Invalid user name' ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.api.changePassword( this.default_data.user_name,\n\t\t\t\tcurrent_password,\n\t\t\t\tnew_password,\n\t\t\t\tconfirm_password,\n\t\t\t\t{\n\t\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\t\tif ( !result.isValid() ) {\n\t\t\t\t\t\t\tTAlertManager.showErrorAlert( result );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.onCloseClick();\n\n\t\t\t\t\t\t\tif ( $this.call_back ) {\n\t\t\t\t\t\t\t\t$this.call_back();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\t}\n\n}\n\nResetPasswordWizardController.type = '';//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzA5Ny5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsZUFBZSxDQUFDO0FBQ2hCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTtBQUNKO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxvQkFBb0IsQ0FBQztBQUNyQjtBQUNBOztBQUVBOztBQUVBOztBQUVBLDBCQUEwQixDQUFDO0FBQzNCOztBQUVBOztBQUVBLGdCQUFnQixDQUFDO0FBQ2pCO0FBQ0E7O0FBRUE7O0FBRUEsM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