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

1 line
16 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"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\tsav