1 line
72 KiB
JavaScript
1 line
72 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["company-companies-CompaniesViewController"],{8653:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CompaniesViewController\": () => (/* binding */ CompaniesViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass CompaniesViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#companies_view_container',\n\t\t\tstatus_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\n\t\t\te_province_array: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'CompaniesEditView.html';\n\t\tthis.permission_id = 'company';\n\t\tthis.viewId = 'Companies';\n\t\tthis.script_name = 'CompanyView';\n\t\tthis.table_name_key = 'company';\n\t\tthis.context_menu_name = $.i18n._( 'Companies' );\n\t\tthis.navigation_label = $.i18n._( 'Companies' );\n\t\tthis.api = TTAPI.APICompany;\n\n\t\tthis.render();\n\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions( callBack ) {\n\t\tvar $this = this;\n\n\t\tvar options = [\n\t\t\t{ option_name: 'status' },\n\t\t\t{ option_name: 'product_edition' },\n\t\t\t{ option_name: 'industry' },\n\t\t\t{ option_name: 'country', field_name: 'country' },\n\t\t\t{ option_name: 'password_policy_type' },\n\t\t\t{ option_name: 'password_minimum_permission_level', field_name: 'password_minimum_permission_level' },\n\t\t\t{ option_name: 'password_minimum_strength', field_name: 'password_minimum_strength' },\n\t\t\t{ option_name: 'ldap_authentication_type' }\n\t\t];\n\n\t\tthis.initDropDownOptions( options, function( result ) {\n\n\t\t\tif ( callBack ) {\n\t\t\t\tcallBack( result ); // First to initialize drop down options, and then to initialize edit view UI.\n\t\t\t}\n\n\t\t} );\n\t}\n\n\tonSetSearchFilterFinished() {\n\t\tvar combo;\n\t\tvar select_value;\n\t\tif ( this.search_panel.getSelectTabIndex() === 0 ) {\n\t\t\tcombo = this.basic_search_field_ui_dic['country'];\n\t\t\tselect_value = combo.getValue();\n\t\t\tthis.setProvince( select_value );\n\t\t} else if ( this.search_panel.getSelectTabIndex() === 1 ) {\n\t\t\tcombo = this.adv_search_field_ui_dic['country'];\n\t\t\tselect_value = combo.getValue();\n\t\t\tthis.setProvince( select_value );\n\t\t}\n\t}\n\n\tonBuildAdvUIFinished() {\n\n\t\tthis.adv_search_field_ui_dic['country'].change( $.proxy( function() {\n\t\t\tvar combo = this.adv_search_field_ui_dic['country'];\n\t\t\tvar selectVal = combo.getValue();\n\n\t\t\tthis.setProvince( selectVal );\n\n\t\t\tthis.adv_search_field_ui_dic['province'].setValue( null );\n\n\t\t}, this ) );\n\t}\n\n\tonBuildBasicUIFinished() {\n\t\tthis.basic_search_field_ui_dic['country'].change( $.proxy( function() {\n\t\t\tvar combo = this.basic_search_field_ui_dic['country'];\n\t\t\tvar selectVal = combo.getValue();\n\n\t\t\tthis.setProvince( selectVal );\n\n\t\t\tthis.basic_search_field_ui_dic['province'].setValue( null );\n\n\t\t}, this ) );\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\t\tvar c_value = target.getValue();\n\t\tthis.current_edit_record[key] = c_value;\n\n\t\tswitch ( key ) {\n\n\t\t\tcase 'country':\n\t\t\t\tvar widget = this.edit_view_ui_dic['province'];\n\t\t\t\twidget.setValue( null );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( key === 'ldap_authentication_type_id' ) {\n\n\t\t\tthis.onTypeChange();\n\t\t}\n\n\t\tif ( key === 'country' ) {\n\t\t\tthis.onCountryChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['mass_edit', 'copy'],\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Login' ),\n\t\t\t\t\tid: 'login',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\t//action_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\tvue_icon: 'tticon tticon-login_black_24dp',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\t\tid: 'jump_to_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tpermission_result: false, // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\t\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Employees' ),\n\t\t\t\t\tid: 'employee',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\tsort_order: 9050,\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'employee':\n\t\t\t\tthis.setDefaultMenuEmployeeIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetCustomEditMenuIcon( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'employee':\n\t\t\t\tthis.setEditMenuEmployeeIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetEditMenuEmployeeIcon( context_btn ) {\n\t\tif ( !this.viewPermissionValidate( 'user' ) ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\t/* jshint ignore:end */\n\tsetDefaultMenuEmployeeIcon( context_btn, grid_selected_length ) {\n\t\tif ( !this.viewPermissionValidate( 'user' ) ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tif ( grid_selected_length === 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\t/* jshint ignore:start */\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'login':\n\t\t\t\tthis.onLoginClick();\n\t\t\t\tbreak;\n\t\t\tcase 'employee':\n\t\t\t\tthis.onEmployeeClick();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonEmployeeClick() {\n\n\t\tvar grid_selected_id_array = this.getGridSelectIdArray();\n\n\t\tvar filter = { filter_data: {} };\n\t\tvar company_id = { value: grid_selected_id_array[0] };\n\t\tfilter.filter_data.company_id = company_id;\n\t\tGlobal.addViewTab( this.viewId, $.i18n._( 'Companies' ), window.location.href );\n\t\tIndexViewController.goToView( 'Employee', filter );\n\t}\n\n\tonLoginClick() {\n\n\t\tvar $this = this;\n\t\tvar args = {};\n\n\t\targs.company_id = this.getGridSelectIdArray()[0];\n\n\t\tLocalCacheData.extra_filter_for_next_open_view = {};\n\t\tLocalCacheData.extra_filter_for_next_open_view.filter_data = args;\n\n\t\tIndexViewController.openWizard( 'LoginUserWizard', null, function( user_id ) {\n\t\t\tGlobal.NewSession( user_id );\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_company': { 'label': $.i18n._( 'Company' ), 'is_multi_column': true },\n\t\t\t'tab_password_policy': { 'label': $.i18n._( 'Password Policy' ) },\n\t\t\t'tab_ldap': { 'label': $.i18n._( 'LDAP Authentication' ) },\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\t//Tab 0 start\n\n\t\tvar tab_company = this.edit_view_tab.find( '#tab_company' );\n\n\t\tvar tab_company_column1 = tab_company.find( '.first-column' );\n\t\tvar tab_company_column2 = tab_company.find( '.second-column' );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APICompany,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_company',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\t\tvar label;\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_company_column1 );\n\t\tthis.edit_view_tabs[0].push( tab_company_column2 );\n\n\t\t// Status\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'status_id' } );\n\t\tform_item_input.setSourceData( $this.status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_company_column1, '' );\n\n\t\t// Product Edition\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'product_edition_id' } );\n\t\tform_item_input.setSourceData( $this.product_edition_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Product Edition' ), form_item_input, tab_company_column1 );\n\n\t\t// Full Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Full Name' ), form_item_input, tab_company_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Short Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'short_name', width: 128 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Short Name' ), form_item_input, tab_company_column1 );\n\n\t\t// Industry\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'industry_id' } );\n\t\tform_item_input.setSourceData( $this.industry_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Industry' ), form_item_input, tab_company_column1 );\n\n\t\t// Address (Line 1)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'address1', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address (Line 1)' ), form_item_input, tab_company_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Address (Line 2)\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'address2', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address (Line 2)' ), form_item_input, tab_company_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'city', width: 149 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'City' ), form_item_input, tab_company_column1 );\n\n\t\t//Country\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'country', set_empty: true } );\n\t\tform_item_input.setSourceData( $this.country_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Country' ), form_item_input, tab_company_column1 );\n\n\t\t//Province / State\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'province' } );\n\t\tform_item_input.setSourceData( [] );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Province/State' ), form_item_input, tab_company_column1 );\n\n\t\t//City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'postal_code', width: 149 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Postal/ZIP Code' ), form_item_input, tab_company_column1, '' );\n\n\t\t// Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'work_phone', width: 149 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Phone' ), form_item_input, tab_company_column2, '' );\n\n\t\t// Fax\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'fax_phone', width: 149 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Fax' ), form_item_input, tab_company_column2 );\n\n\t\t// Administrative Contact\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_user',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'admin_contact',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} )\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Administrative Contact' ), form_item_input, tab_company_column2 );\n\n\t\t// billing contact\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_user',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'billing_contact',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} )\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Billing Contact' ), form_item_input, tab_company_column2 );\n\t\t// Primary Support contact\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_user',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'support_contact',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} )\n\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Primary Support Contact' ), form_item_input, tab_company_column2 );\n\n\t\t// Company Settings\n\t\t// form_item_input = Global.loadWidgetByName( FormItemType.SEPARATED_BOX );\n\t\t// form_item_input.SeparatedBox( {label: $.i18n._( 'Company Settings' )} );\n\t\t// this.addEditFieldToColumn( null, form_item_input, tab_company_column2 );\n\n\t\t// // Enable Second Surname\n\t\t// form_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t// form_item_input.TCheckbox( {field: 'enable_second_last_name'} );\n\t\t// this.addEditFieldToColumn( $.i18n._( 'Enable Second Surname' ), form_item_input, tab_company_column2, '' );\n\n\t\t//Tab 1 start\n\n\t\tvar tab_password_policy = this.edit_view_tab.find( '#tab_password_policy' );\n\n\t\tvar tab_password_policy_column1 = tab_password_policy.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[1] = [];\n\n\t\tthis.edit_view_tabs[1].push( tab_password_policy_column1 );\n\n\t\t// Password Policy\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'password_policy_type_id' } );\n\t\tform_item_input.setSourceData( $this.password_policy_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Password Policy' ), form_item_input, tab_password_policy_column1, '' );\n\n\t\t// Minimum Permission Level\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'password_minimum_permission_level' } );\n\t\tform_item_input.setSourceData( $this.password_minimum_permission_level_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Permission Level' ), form_item_input, tab_password_policy_column1 );\n\n\t\t// Minimum Strength\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'password_minimum_strength' } );\n\t\tform_item_input.setSourceData( $this.password_minimum_strength_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Strength' ), form_item_input, tab_password_policy_column1 );\n\n\t\t// Minimum Length\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'password_minimum_length', width: 30 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Length' ), form_item_input, tab_password_policy_column1 );\n\n\t\t// Minimum Age\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'password_minimum_age', width: 30 } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'in Days' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Age' ), form_item_input, tab_password_policy_column1, '', widgetContainer );\n\n\t\t// Maximum Age\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'password_maximum_age', width: 30 } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'in Days' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Maximum Age' ), form_item_input, tab_password_policy_column1, '', widgetContainer );\n\n\t\t//Tab 1 start\n\n\t\tvar tab_ldap = this.edit_view_tab.find( '#tab_ldap' );\n\n\t\tvar tab_ldap_column1 = tab_ldap.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[2] = [];\n\n\t\tthis.edit_view_tabs[2].push( tab_ldap_column1 );\n\n\t\t//\n\t\t// LDAP Authentication\n\t\t//\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'ldap_authentication_type_id' } );\n\t\tform_item_input.setSourceData( $this.ldap_authentication_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'LDAP Authentication' ), form_item_input, tab_ldap_column1 );\n\n\t\t// Server\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_host', width: 240 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( '(ie: ldap.example.com or ldaps://ldap.example.com for SSL)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Server' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\n\t\t// Port\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_port', width: 50 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( '(ie: 389 or 636 for SSL)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Port' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\n\t\t// Bind User Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_bind_user_name' } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'Used to search for the user, for anonymous binding enter: anonymous' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Bind User Name' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\n\t\t// Bind Password\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_bind_password' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Bind Password' ), form_item_input, tab_ldap_column1, '', null, true );\n\n\t\t// Base DN\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_base_dn', width: 300 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( '(ie: ou=People,dc=example,dc=com)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Base DN' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\n\t\t// Bind Attribute\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_bind_attribute', width: 150 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'For binding the LDAP user. (ie: AD/openLDAP: userPrincipalName, Mac OSX: uid)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Bind Attribute' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\n\t\t// User Filter\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_user_filter', width: 150 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'Additional filter parameters. (ie: is_timetrex_user=1)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'User Filter' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\n\t\t// Login Attribute\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'ldap_login_attribute', width: 150 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'For searching the LDAP user. (ie: AD: sAMAccountName, openLDAP: dn, Mac OSX: dn)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Login Attribute' ), form_item_input, tab_ldap_column1, '', widgetContainer, true );\n\t}\n\n\tsetCompanyIdFilter( args ) {\n\n\t\tvar company_id = this.current_edit_record.id;\n\n\t\tif ( !company_id ) {\n\t\t\tcompany_id = -1;\n\t\t}\n\t\tif ( !args ) {\n\t\t\targs = { filter_data: { company_id: company_id } };\n\n\t\t} else {\n\t\t\tif ( !args.filter_data ) {\n\t\t\t\targs.filter_data = { company_id: company_id };\n\t\t\t} else {\n\t\t\t\targs.filter_data.company_id = company_id;\n\t\t\t}\n\t\t}\n\n\t\treturn args;\n\t}\n\n\tsetCurrentEditRecordData() {\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 'country':\n\t\t\t\t\t\tthis.setCountryValue( widget, key );\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\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.onTypeChange();\n\t}\n\n\tonTypeChange() {\n\t\tif ( this.current_edit_record.ldap_authentication_type_id == 0 ) {\n\t\t\tthis.detachElement( 'ldap_host' );\n\t\t\tthis.detachElement( 'ldap_port' );\n\t\t\tthis.detachElement( 'ldap_bind_user_name' );\n\t\t\tthis.detachElement( 'ldap_bind_password' );\n\t\t\tthis.detachElement( 'ldap_base_dn' );\n\t\t\tthis.detachElement( 'ldap_bind_attribute' );\n\t\t\tthis.detachElement( 'ldap_user_filter' );\n\t\t\tthis.detachElement( 'ldap_login_attribute' );\n\t\t} else {\n\t\t\tthis.attachElement( 'ldap_host' );\n\t\t\tthis.attachElement( 'ldap_port' );\n\t\t\tthis.attachElement( 'ldap_bind_user_name' );\n\t\t\tthis.attachElement( 'ldap_bind_password' );\n\t\t\tthis.attachElement( 'ldap_base_dn' );\n\t\t\tthis.attachElement( 'ldap_bind_attribute' );\n\t\t\tthis.attachElement( 'ldap_user_filter' );\n\t\t\tthis.attachElement( 'ldap_login_attribute' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tsetProvince( val, m ) {\n\t\tvar $this = this;\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.province_array = [];\n\t\t\tthis.adv_search_field_ui_dic['province'].setSourceData( [] );\n\t\t\tthis.basic_search_field_ui_dic['province'].setSourceData( [] );\n\n\t\t} else {\n\n\t\t\tthis.api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.province_array = Global.buildRecordArray( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['province'].setSourceData( $this.province_array );\n\t\t\t\t\t$this.basic_search_field_ui_dic['province'].setSourceData( $this.province_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\teSetProvince( val, refresh ) {\n\t\tvar $this = this;\n\t\tvar province_widget = $this.edit_view_ui_dic['province'];\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.e_province_array = [];\n\t\t\tprovince_widget.setSourceData( [] );\n\t\t} else {\n\t\t\tthis.api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.e_province_array = Global.buildRecordArray( res );\n\t\t\t\t\tif ( refresh && $this.e_province_array.length > 0 ) {\n\t\t\t\t\t\t$this.current_edit_record.province = $this.e_province_array[0].value;\n\t\t\t\t\t\tprovince_widget.setValue( $this.current_edit_record.province );\n\t\t\t\t\t}\n\t\t\t\t\tprovince_widget.setSourceData( $this.e_province_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'name',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Short Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'short_name',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Status' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Product Edition' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'product_edition_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Country' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'country',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.COMBO_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Province/State' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'province',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'City' ),\n\t\t\t\tfield: 'city',\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 2,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Created By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'created_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tscript_name: 'EmployeeView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Updated By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'updated_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tscript_name: 'EmployeeView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\n\t\t];\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODY1My5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDJCQUEyQixDQUFDO0FBQzVCLDBCQUEwQixDQUFDO0FB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