TimeTrex/interface/html5/dist/my_account-password-ChangePasswordViewController.bundle.js

1 line
47 KiB
JavaScript

"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["my_account-password-ChangePasswordViewController"],{1968:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ChangePasswordViewController\": () => (/* binding */ ChangePasswordViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ChangePasswordViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tshowPassword: null,\n\n\t\t\tshowPhonePassword: null,\n\t\t\tmfa_type_array: null,\n\t\t\thas_authenticated: false,\n\t\t\tapi_authentication: null,\n\t\t\tapi_misc: null,\n\t\t\tapi_notification_device_token: null,\n\n\t\t\tresult_data: []\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\n\t\t//this._super('initialize', options );\n\n\t\tthis.permission_id = 'user';\n\t\tthis.viewId = 'ChangePassword';\n\t\tthis.script_name = 'ChangePasswordView';\n\t\tthis.context_menu_name = $.i18n._( 'Passwords / Security' );\n\t\tthis.api = TTAPI.APIUser;\n\t\tthis.api_authentication = TTAPI.APIAuthentication;\n\t\tthis.api_notification_device_token = TTAPI.APINotificationDeviceToken;\n\t\tthis.api_misc = TTAPI.APIMisc;\n\n\t\tthis.initPermission();\n\n\t\tthis.render();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions( callback ) {\n\t\tvar options = [{ option_name: 'mfa_type' },];\n\n\t\tthis.initDropDownOptions( options, callback );\n\t}\n\n\tinitPermission() {\n\t\tsuper.initPermission();\n\n\t\tif ( PermissionManager.validate( 'user', 'edit_own_password' ) ) {\n\t\t\tthis.showPassword = true;\n\t\t} else {\n\t\t\tthis.showPassword = false;\n\t\t}\n\n\t\tif ( PermissionManager.validate( 'user', 'edit_own_phone_password' ) ) {\n\t\t\tthis.showPhonePassword = true;\n\t\t} else {\n\t\t\tthis.showPhonePassword = false;\n\t\t}\n\t}\n\n\trender() {\n\t\tsuper.render();\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\tgroups: {\n\t\t\t\ttrusted: {\n\t\t\t\t\tlabel: $.i18n._( 'Trusted Device' ), id: this.viewId + 'trusted', sort_order: 8000\n\t\t\t\t}\n\t\t\t},\n\t\t\texclude: ['default'],\n\t\t\tinclude: [\n\t\t\t\t'save',\n\t\t\t\t'cancel',\n\t\t\t\t{\n\t\t\t\t\tlabel: '', //Empty label. vue_icon is displayed instead of text.\n\t\t\t\t\tid: 'other_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'other',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tvue_icon: 'tticon tticon-more_vert_black_24dp',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Reauthenticate' ),\n\t\t\t\t\tid: 'reauthenticate',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'other'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Register API Key' ),\n\t\t\t\t\tid: 'register_api_key',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'other'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Remove All Trusted Devices' ),\n\t\t\t\t\tid: 'remove_all_trusted_devices',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'other'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Logout All Sessions' ),\n\t\t\t\t\tid: 'logout_all_sessions',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'other'\n\t\t\t\t},\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'remove_all_trusted_devices':\n\t\t\t\tthis.removeAllTrustedDevices();\n\t\t\t\tbreak;\n\t\t\tcase 'reauthenticate':\n\t\t\t\tGlobal.showAuthenticationModal( this.viewId, 'user_name_multi_factor', {\n\t\t\t\t\tstep: 'password',\n\t\t\t\t\ttype_id: 10,\n\t\t\t\t\tuser_action_message: ''\n\t\t\t\t}, true, ( result ) => {\n\t\t\t\t\tGlobal.hideAuthenticationModal();\n\t\t\t\t\tif ( result.status === true ) {\n\t\t\t\t\t\tthis.has_authenticated = true;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tcase 'register_api_key':\n\t\t\t\tthis.registerAPIKey();\n\t\t\t\tbreak;\n\t\t\tcase 'logout_all_sessions':\n\t\t\t\tthis.logoutAllSessions();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tregisterAPIKey() {\n\t\tthis.api_authentication.registerAPIKeyForCurrentUser( {\n\t\t\tonResult: ( result ) => {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tvar key = result.getResult();\n\t\t\t\t\tTAlertManager.showFlexAlert( $.i18n._( 'API Key' ), $.i18n._( 'Below is a new API key for ' ) + LocalCacheData.getLoginUser().user_name + $.i18n._( ' Please copy or write it down for safe keeping, as you will not be able to see it again after this.' ), 'text', key, null, 345, $.i18n._( 'Close' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tlogoutAllSessions() {\n\t\tTAlertManager.showConfirmAlert( $.i18n._( 'Which sessions do you want to log out? Note that your current session will not be logged out.' ), $.i18n._( 'Logout' ), ( flag ) => {\n\t\t\tthis.api_authentication.logoutAllSessions( !flag, {\n\t\t\t\tonResult: ( result ) => {\n\t\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Sessions have been logged out.' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}, $.i18n._( 'Browser/App' ), $.i18n._( '+API Keys' ) );\n\t}\n\n\tremoveAllTrustedDevices() {\n\t\tthis.api_authentication.removeAllTrustedDevices( {\n\t\t\tonResult: ( result ) => {\n\t\t\t\tTAlertManager.showAlert( $.i18n._( 'All trusted devices have been removed.' ), $.i18n._( 'Trusted Device' ) );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsaveValidate( context_btn, p_id ) {\n\t\t// always show\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\t//Set current edit record data to all widgets\n\n\t\tfor ( var key in this.current_edit_record ) {\n\t\t\tvar widget = this.edit_view_ui_dic[key];\n\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'user_name':\n\t\t\t\t\t\twidget.setValue( LocalCacheData.loginUser.user_name );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'phone_id':\n\n\t\t\t\t\t\tif ( !LocalCacheData.loginUser.phone_id ) {\n\t\t\t\t\t\t\twidget.setValue( $.i18n._( 'Not Specified' ) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twidget.setValue( LocalCacheData.loginUser.phone_id );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\topenEditView() {\n\n\t\tvar $this = this;\n\n\t\tif ( $this.edit_only_mode && ( this.showPassword || this.showPhonePassword ) ) {\n\n\t\t\t$this.buildContextMenu();\n\n\t\t\t$this.initOptions( () => {\n\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\t$this.initEditViewUI( 'ChangePassword', 'ChangePasswordEditView.html' );\n\t\t\t\t}\n\n\t\t\t\t$this.getUserPasswordData( function( result ) {\n\t\t\t\t\t$this.current_edit_record = result;\n\t\t\t\t\t$this.initEditView();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t}\n\t}\n\n\tgetUserPasswordData( callBack ) {\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.id = LocalCacheData.loginUser.id;\n\t\tfilter.filter_columns = { id: true, mfa_type_id: true };\n\n\t\t$this.api['get' + $this.api.key_name]( filter, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\tif ( Global.isSet( result_data[0] ) ) {\n\t\t\t\t\tcallBack( result_data[0] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tcheckTabPermissions( tab ) {\n\t\tvar retval = false;\n\n\t\tswitch ( tab ) {\n\t\t\tcase 'tab_web_password':\n\t\t\t\tif ( this.showPassword ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_quick_punch_password':\n\t\t\t\tif ( this.showPhonePassword ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretval = super.checkTabPermissions( tab );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn retval;\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\n\t\tvar key = target.getField();\n\t\t//this.current_edit_record[key] = target.getValue();\n\t\tvar c_value = target.getValue();\n\n\t\tswitch ( key ) {\n\t\t\tcase 'mfa_type_id':\n\t\t\t\tthis.onMfaTypeChange( c_value );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.current_edit_record[key] = c_value;\n\t}\n\n\ttoggleSaveButton( show_button ) {\n\t\tvar context_menu_array = ContextMenuManager.getMenuModelByMenuId( this.determineContextMenuMountAttributes().id );\n\n\t\tcontext_menu_array.forEach( ( context_btn ) => {\n\t\t\tif ( context_btn.id === 'save' ) {\n\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, show_button );\n\t\t\t}\n\t\t} );\n\t}\n\n\tonMfaTypeChange( mfa_type_id ) {\n\t\t//Disable \"Save\" button as the user may quickly press it before the QR code is generated, causing them to miss instructions.\n\t\tthis.toggleSaveButton( false );\n\n\t\t//Validate current user to make sure mfa settings can be saved\n\t\tthis.api.validateUser( { id: LocalCacheData.getLoginUser().id }, {\n\t\t\tonResult: ( result ) => {\n\t\t\t\tif ( result.isValid() == false ) {\n\t\t\t\t\tlet details = result.getDetails();\n\t\t\t\t\tlet error_string = $.i18n._( 'Validation Error. Unable to turn on Multifactor Authentication.<br><br>' );\n\n\t\t\t\t\tif ( Global.isArray( details ) || typeof details === 'object' ) {\n\t\t\t\t\t\terror_string += Global.convertValidationErrorToString( details );\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror_string += result.getDescription();\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.toggleSaveButton( true );\n\t\t\t\t\tTAlertManager.showAlert( error_string, $.i18n._( 'Error' ) );\n\t\t\t\t} else {\n\t\t\t\t\tif ( mfa_type_id === 0 ) {\n\t\t\t\t\t\tthis.toggleSaveButton( true );\n\t\t\t\t\t\treturn; //Do not show MFA instructions if MFA is being turned off\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.showMfaInstructions( true );\n\t\t\t\t}\n\n\t\t\t\t//If we need to check app token exists\n\t\t\t\t// let data = {};\n\t\t\t\t// data.filter_data = { id: LocalCacheData.getLoginUser().id };\n\t\t\t\t// this.api_notification_device_token.getNotificationDeviceToken( data, {\n\t\t\t\t// \tonResult: ( res ) => {\n\t\t\t\t// \t\tresult = res.getResult();\n\t\t\t\t// \t\tif ( Array.isArray( result ) && result.length > 0 ) {\n\t\t\t\t// \t\t\tthis.showMfaInstructions( true );\n\t\t\t\t// \t\t} else {\n\t\t\t\t// \t\t\tthis.showMfaInstructions( false );\n\t\t\t\t// \t\t}\n\t\t\t\t// \t}\n\t\t\t\t// } );\n\t\t\t\t// }\n\t\t\t}\n\t\t} );\n\t}\n\n\tshowMfaInstructions( has_notification_device_token ) {\n\t\tthis.api_misc.generateQRCode( JSON.stringify( {\n\t\t\tserver_url: Global.getBaseURL( null, false ).replace( '/interface/html5/', '' ), //App does not need the /interface/html5/ part of the URL\n\t\t\tuser_name: LocalCacheData.getLoginUser().user_name\n\t\t} ), {\n\t\t\tonResult: ( res ) => {\n\t\t\t\tthis.toggleSaveButton( true );\n\n\t\t\t\tlet result = res.getResult();\n\t\t\t\tTAlertManager.showModalAlert( 'multifactor_authentication', 'download_instructions', ( flag ) => {\n\t\t\t\t\tif ( flag === true ) {\n\t\t\t\t\t\tthis.onSaveClick();\n\t\t\t\t\t}\n\t\t\t\t}, result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tonSaveClick( ignoreWarning ) {\n\t\tvar $this = this;\n\n\t\tvar record = this.current_edit_record;\n\t\tLocalCacheData.current_doing_context_action = 'save';\n\t\tif ( !Global.isSet( ignoreWarning ) ) {\n\t\t\tignoreWarning = false;\n\t\t}\n\t\tthis.clearErrorTips();\n\n\t\tvar key = this.getEditViewTabIndex();\n\t\tif ( key === 0 ) {\n\t\t\t$this.saveWebPassword( record, function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\n\t\t\t\t\t$this.removeEditView();\n\t\t\t\t} else {\n\t\t\t\t\t$this.showErrorTips( result, 0 );\n\t\t\t\t}\n\n\t\t\t} );\n\t\t} else if ( key === 1 ) {\n\t\t\t$this.savePhonePassword( record, function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\n\t\t\t\t\t$this.removeEditView();\n\t\t\t\t} else {\n\t\t\t\t\t$this.showErrorTips( result, 1 );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else if ( key === 2 ) {\n\t\t\t$this.saveMultiFactorSettings( record, function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\n\t\t\t\t\t$this.removeEditView();\n\t\t\t\t} else {\n\t\t\t\t\t$this.showErrorTips( result, 1 );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tshowErrorTips( result, index ) {\n\n\t\tvar details = result.getDetails();\n\t\tvar error_list = details;\n\t\tvar tabKey;\n\n\t\tvar found_in_current_tab = false;\n\t\tfor ( var key in error_list ) {\n\t\t\tif ( parseInt( index ) === 0 ) {\n\n\t\t\t\tif ( this.current_edit_record['web.password'] ) {\n\t\t\t\t\ttabKey = 'web.' + key;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( parseInt( index ) === 1 ) {\n\t\t\t\tif ( this.current_edit_record['phone.password'] ) {\n\t\t\t\t\ttabKey = 'phone.' + key.replace( 'phone_', '' );\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( !error_list.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !Global.isSet( this.edit_view_ui_dic[tabKey] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( this.edit_view_ui_dic[tabKey].is( ':visible' ) ) {\n\t\t\t\tthis.edit_view_ui_dic[tabKey].setErrorStyle( error_list[key], true );\n\t\t\t\tfound_in_current_tab = true;\n\t\t\t}\n\n\t\t\tthis.edit_view_error_ui_dic[tabKey] = this.edit_view_ui_dic[tabKey];\n\n\t\t}\n\n\t\tif ( !found_in_current_tab ) {\n\n\t\t\tthis.showEditViewError( result );\n\n\t\t}\n\t}\n\n\tsaveWebPassword( record, callBack ) {\n\t\tvar $this = this;\n\t\tthis.api['changePassword']( record['web.password'], record['web.password2'], 'user_name', {\n\t\t\tonResult: function( result ) {\n\t\t\t\tcallBack( result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsavePhonePassword( record, callBack ) {\n\t\tvar $this = this;\n\t\tthis.api['changePassword']( record['phone.password'], record['phone.password2'], 'quick_punch_id', {\n\t\t\tonResult: function( result ) {\n\t\t\t\tcallBack( result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsaveMultiFactorSettings( record, callBack ) {\n\t\tthis.api.setMultiFactorSettings( this.current_edit_record.mfa_type_id, {\n\t\t\tonResult: ( result ) => {\n\t\t\t\tcallBack( result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tbuildEditViewUI() {\n\t\tvar $this = this;\n\t\tsuper.buildEditViewUI();\n\n\t\tvar tab_model = {\n\t\t\t'tab_web_password': { 'label': $.i18n._( 'Web Password' ) },\n\t\t\t'tab_quick_punch_password': { 'label': $.i18n._( 'Quick Punch Password' ) },\n\t\t\t'tab_multifactor': {\n\t\t\t\t'label': $.i18n._( 'Multifactor Authentication' ),\n\t\t\t\tinit_callback: 'initMultifactorView',\n\t\t\t\thtml_template: this.getMultifactorTabHtml()\n\t\t\t},\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\t//Tab 0 start\n\n\t\tvar tab_web_password = this.edit_view_tab.find( '#tab_web_password' );\n\n\t\tvar tab_web_password_column1 = tab_web_password.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_web_password_column1 );\n\n\t\t// User Name\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'user_name' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'User Name' ), form_item_input, tab_web_password_column1, '' );\n\n\t\t// New Password\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TPasswordInput( { field: 'web.password', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'New Password' ), form_item_input, tab_web_password_column1 );\n\n\t\t// New Password(confirm)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TPasswordInput( { field: 'web.password2', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'New Password (Confirm)' ), form_item_input, tab_web_password_column1, '' );\n\n\t\t//Tab 1 start\n\n\t\tvar tab_quick_punch_password = this.edit_view_tab.find( '#tab_quick_punch_password' );\n\n\t\tvar tab_quick_punch_password_column1 = tab_quick_punch_password.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[1] = [];\n\n\t\tthis.edit_view_tabs[1].push( tab_quick_punch_password_column1 );\n\n\t\t// Quick Punch ID\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'phone_id' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Quick Punch ID' ), form_item_input, tab_quick_punch_password_column1, '' );\n\n\t\t// New Password\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TPasswordInput( { field: 'phone.password', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'New Quick Punch Password' ), form_item_input, tab_quick_punch_password_column1 );\n\n\t\t// New Password(confirm)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TPasswordInput( { field: 'phone.password2', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'New Quick Punch Password (Confirm)' ), form_item_input, tab_quick_punch_password_column1, '' );\n\n\t\t//Tab 2 start\n\n\t\tvar tab_multifactor = this.edit_view_tab.find( '#tab_multifactor' );\n\t\tvar tab_multifactor_column1 = tab_multifactor.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[1] = [];\n\t\tthis.edit_view_tabs[1].push( tab_multifactor_column1 );\n\n\t\t// Multifactor Authentication Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'mfa_type_id' } );\n\t\tform_item_input.setSourceData( this.mfa_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Multifactor Type' ), form_item_input, tab_multifactor_column1, '' );\n\t}\n\n\tinitMultifactorView() {\n\t\tif ( ( Global.getProductEdition() >= 15 ) ) {\n\t\t\tthis.edit_view_tab.find( '#tab_multifactor' ).find( '.first-column' ).css( 'display', 'block' );\n\t\t\tthis.edit_view.find( '.permission-defined-div' ).css( 'display', 'none' );\n\t\t} else {\n\t\t\tthis.edit_view_tab.find( '#tab_multifactor' ).find( '.first-column' ).css( 'display', 'none' );\n\t\t\tthis.edit_view.find( '.permission-defined-div' ).css( 'display', 'block' );\n\t\t\tthis.edit_view.find( '.permission-message' ).html( Global.getUpgradeMessage() );\n\t\t}\n\t}\n\n\tgetMultifactorTabHtml() {\n\t\treturn `\n\t\t<div id=\"tab_multifactor\" class=\"edit-view-tab-outside\">\n\t\t\t<div class=\"edit-view-tab\" id=\"tab_multifactor_content_div\">\n\t\t\t\t<div class=\"first-column full-width-column\"></div>\n\t\t\t\t<div class=\"save-and-continue-div permission-defined-div\">\n\t\t\t\t\t<span class=\"message permission-message\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`;\n\t}\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk2OC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxJQUFJOztBQUVKO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsMkJBQTJCLENBQUM7QUFDNUI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBLG1CQUFtQix5QkFBeUI7O0FBRTVDO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsSUFBSTtBQUNKO0F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