(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["company-company-CompanyViewController","filebrowser-TImageAdvBrowser","filebrowser-TImageBrowser"],{8243:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageAdvBrowser = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageAdvBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar name = 'filedata';\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\n\t\tvar callBack = null;\n\n\t\tvar enabled = true;\n\n\t\tvar image;\n\n\t\tvar result_form_data;\n\n\t\tthis.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.children().eq( 1 );\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.hide();\n\t\t\t} else {\n\t\t\t\tbtn.show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn result_form_data;\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() + '&X-CSRF-Token=' + getCookie( 'CSRF-Token' ) );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tthis.onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\tvar $$this = this;\n\n\t\t\t$( this ).find( '#upload_image' ).text( $.i18n._( 'Upload Image' ) );\n\n\t\t\tif ( o.callBack ) {\n\t\t\t\tcallBack = o.callBack;\n\t\t\t}\n\n\t\t\tif ( o.show_browser === false ) {\n\t\t\t\t$( this ).children().eq( 1 ).hide();\n\t\t\t}\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\t$this.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar browser = $( this ).children().eq( 1 );\n\t\t\tbrowser.bind( 'click', function() {\n\t\t\t\tIndexViewController.openWizard( 'UserPhotoWizard', null, function( form_data ) {\n\n\t\t\t\t\tif ( callBack ) {\n\t\t\t\t\t\tcallBack( form_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tresult_form_data = form_data;\n\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\timage = $( this ).children().eq( 0 );\n\t\t\timage.on( 'load', function() {\n\t\t\t\t$this.onImageLoad( this );\n\t\t\t} );\n\n\t\t\timage.hide();\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageAdvBrowser.defaults = {};\n\t$.fn.TImageAdvBrowser.html_template = `\n\t
\n\t\t\n\t\t\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBOzt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dFx0XHRcdFx0fVxuXG5cdFx0XHRcdFx0cmVzdWx0X2Zvcm1fZGF0YSA9IGZvcm1fZGF0YTtcblxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9ICk7XG5cblx0XHRcdGltYWdlID0gJCggdGhpcyApLmNoaWxkcmVuKCkuZXEoIDAgKTtcblx0XHRcdGltYWdlLm9uKCAnbG9hZCcsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkdGhpcy5vbkltYWdlTG9hZCggdGhpcyApO1xuXHRcdFx0fSApO1xuXG5cdFx0XHRpbWFnZS5oaWRlKCk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uVEltYWdlQWR2QnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUFkdkJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxidXR0b24gaWQ9XCJ1cGxvYWRfaW1hZ2VcIiBjbGFzcz1cInQtYnV0dG9uIGZpbGUtYnJvd3Nlci1idG5cIiBzdHlsZT1cImRpc3BsYXk6IGJsb2NrXCI+PC9idXR0b24+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},8326:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageBrowser = function( options ) {\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar id = 'file_browser';\n\t\tvar name = 'filedata';\n\t\tvar browser;\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\t\tvar enabled = true;\n\n\t\tthis.setEnabled = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.find( '.browser-form input' );\n\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.attr( 'disabled', true );\n\t\t\t\tbtn.removeClass( 'disable-element' ).addClass( 'disable-element' );\n\t\t\t} else {\n\t\t\t\tbtn.removeAttr( 'disabled' );\n\t\t\t\tbtn.removeClass( 'disable-element' );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getFileName = function() {\n\n\t\t\treturn browser.val();\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\tvar form_data;\n\t\t\tif ( browser && browser.val() ) {\n\n\t\t\t\tif ( typeof FormData == 'undefined' ) {\n\t\t\t\t\tform_data = $this.find( '.browser-form' );\n\t\t\t\t} else {\n\t\t\t\t\tform_data = new FormData( $( $this.find( '.browser-form' ) )[0] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tform_data = null;\n\t\t\t}\n\n\t\t\treturn form_data;\n\t\t};\n\n\t\tthis.getImageSrc = function() {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\treturn image.attr( 'src' );\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tvar onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.each( function() {\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\t// var $this = this;\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tbrowser = $( this ).find( '.browser' );\n\t\t\tvar image = $( this ).find( '.image' );\n\t\t\timage.hide();\n\t\t\timage.on( 'load', function() {\n\t\t\t\tonImageLoad( this );\n\n\t\t\t} );\n\n\t\t\tif ( accept_filter ) {\n\t\t\t\tbrowser.attr( 'accept', accept_filter );\n\t\t\t} else {\n\t\t\t\taccept_filter = 'image/*';\n\t\t\t\tbrowser.attr( 'accept', 'image/*' );\n\t\t\t}\n\n\t\t\tbrowser.attr( 'id', id );\n\t\t\tbrowser.attr( 'name', name );\n\n\t\t\tif ( Global.isSet( o.changeHandler ) ) {\n\n\t\t\t\t$this.bind( 'imageChange', o.changeHandler );\n\t\t\t}\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\tthis.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tbrowser.bind( 'change', function() {\n\t\t\t\timage.hide();\n\n\t\t\t\tif ( typeof FileReader != 'undefined' ) {\n\n\t\t\t\t\tvar files = !!this.files ? this.files : [];\n\n\t\t\t\t\t// If no files were selected, or no FileReader support, return\n\t\t\t\t\tif ( !files.length || !window.FileReader ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( accept_filter === 'image/*' ) {\n\t\t\t\t\t\t// Create a new instance of the FileReader\n\t\t\t\t\t\tvar reader = new FileReader();\n\n\t\t\t\t\t\t// Read the local file as a DataURL\n\t\t\t\t\t\treader.readAsDataURL( files[0] );\n\n\t\t\t\t\t\t// When loaded, set image data as background of div\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = this.result;\n\t\t\t\t\t\t\timage.attr( 'src', url );\n\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$this.trigger( 'imageChange', [$this] );\n\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageBrowser.defaults = {};\n\t$.fn.TImageBrowser.html_template = `\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlI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pbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxmb3JtIGVuY3R5cGU9XCJtdWx0aXBhcnQvZm9ybS1kYXRhXCIgY2xhc3M9XCJicm93c2VyLWZvcm1cIj5cblx0XHRcdDxpbnB1dCBuYW1lPVwiZmlsZWRhdGFcIiBjbGFzcz1cImJyb3dzZXJcIiB0eXBlPVwiZmlsZVwiLz5cblx0XHQ8L2Zvcm0+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8326\n")},4164:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CompanyViewController\": () => (/* binding */ CompanyViewController)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8326);\n/* harmony import */ var _global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8243);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\n\nclass CompanyViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tproduct_edition_array: null,\n\t\t\tindustry_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\te_province_array: null,\n\t\t\tterminated_user_disable_login_type_array: null,\n\t\t\tpassword_policy_type_array: null,\n\t\t\tpassword_minimum_permission_level_array: null,\n\t\t\tpassword_minimum_strength_array: null,\n\t\t\tldap_authentication_type_array: null,\n\n\t\t\tfile_browser: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\tvar $this = this;\n\n\t\tthis.permission_id = 'company';\n\t\tthis.viewId = 'Company';\n\t\tthis.script_name = 'CompanyView';\n\t\tthis.table_name_key = 'company';\n\t\tthis.context_menu_name = $.i18n._( 'Company Information' );\n\t\tthis.api = TTAPI.APICompany;\n\n\t\tthis.render();\n\t\t// this.buildContextMenu(); // #VueContextMenu#EditOnly - Commented out as must happen after initEditViewUI\n\n\n\t\tthis.initData();\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\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]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tinitOptions( callBack ) {\n\n\t\tvar options = [\n\t\t\t{ option_name: 'product_edition' },\n\t\t\t{ option_name: 'terminated_user_disable_login_type' },\n\t\t\t{ option_name: 'industry' },\n\t\t\t{ option_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\tgetCompanyData( callBack ) {\n\t\tvar $this = this;\n\n\t\t// First to get current company's user default data, if no have any data to get the default data which has been set up in TTAPI.APIUserDefault.\n\t\tvar args = { filter_data: { id: LocalCacheData.getLoginUser().company_id } };\n\n\t\t$this.api['get' + $this.api.key_name]( args, {\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\n\t\t\t}\n\t\t} );\n\t}\n\n\topenEditView() {\n\n\t\tvar $this = this;\n\n\t\tif ( $this.edit_only_mode ) {\n\n\t\t\t$this.initOptions( function( result ) {\n\n\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\t$this.initEditViewUI( 'Company', 'CompanyEditView.html' );\n\t\t\t\t\t$this.buildContextMenu(); // #VueContextMenu#EditOnly - Must happen after initEditViewUI\n\t\t\t\t}\n\n\t\t\t\t$this.getCompanyData( function( result ) {\n\t\t\t\t\t// Waiting for the TTAPI.API returns data to set the current edit record.\n\t\t\t\t\t$this.current_edit_record = result;\n\n\t\t\t\t\t$this.initEditView();\n\n\t\t\t\t} );\n\n\t\t\t} );\n\n\t\t} else {\n\t\t\tif ( !this.edit_view ) {\n\t\t\t\tthis.initEditViewUI( 'Company', 'CompanyEditView.html' );\n\t\t\t}\n\t\t}\n\n\t\tvar new_url = window.location.href;\n\t\tif ( new_url.indexOf( 'company_id' ) == -1 ) {\n\t\t\tnew_url = new_url + '&company_id=' + LocalCacheData.getLoginUser().company_id;\n\t\t\tGlobal.setURLToBrowser( new_url );\n\t\t}\n\t}\n\n\tremoveCompanyIdFromUrl() {\n\t\tvar new_url = window.location.href;\n\t\tif ( new_url.indexOf( 'company_id' ) != -1 ) {\n\t\t\tvar parts = new_url.split( '&' );\n\t\t\tnew_url = parts[0];\n\t\t\tfor ( var i = 1; i < ( parts.length - 1 ); i++ ) {\n\t\t\t\tnew_url += ( '&' + parts[i] );\n\t\t\t}\n\t\t\tGlobal.setURLToBrowser( new_url );\n\t\t}\n\t}\n\n\tremoveEditView() {\n\t\tthis.removeCompanyIdFromUrl();\n\t\tsuper.removeEditView();\n\t}\n\n\tsetCurrentEditRecordData() {\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.file_browser.setImage( ServiceCaller.getURLByObjectType( 'company_logo' ) );\n\n\t\tthis.collectUIDataToCurrentEditRecord();\n\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.onTypeChange();\n\t}\n\n\tinitSubPasswordPolicyView() {\n\t\tif ( Global.getProductEdition() >= 15 ) {\n\t\t\tthis.edit_view_tab.find( '#tab_password_policy' ).find( '.first-column' ).css( 'display', 'block' );\n\t\t\tthis.edit_view.find( '.permission-defined-div' ).css( 'display', 'none' );\n\t\t\tthis.buildContextMenu( true );\n\t\t\tthis.setEditMenu();\n\t\t} else {\n\t\t\tthis.edit_view_tab.find( '#tab_password_policy' ).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\tsetEditMenuSaveIcon( context_btn, pId ) {\n\t\t//#2542 - Always needs a save icon as this view is always in edit-only mode, ver in view mode\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\tonSaveDone( result ) {\n\t\tif ( result.isValid() && result.getResult() === true ) {\n\t\t\tthis.updateCurrentCompanyCache();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tupdateCurrentCompanyCache() {\n\n\t\tvar authentication_api = TTAPI.APIAuthentication;\n\t\tauthentication_api.getCurrentCompany( { onResult: this.onGetCurrentCompany } );\n\t}\n\n\tonGetCurrentCompany( e ) {\n\n\t\tvar result = e.getResult();\n\t\tif ( result.is_setup_complete === '1' || result.is_setup_complete === 1 ) {\n\t\t\tresult.is_setup_complete = true;\n\t\t} else {\n\t\t\tresult.is_setup_complete = false;\n\t\t}\n\n\t\tLocalCacheData.setCurrentCompany( result );\n\t}\n\n\tupdateCompanyLogo() {\n\t\t$( '#rightLogo, #topbar-company-logo' ).css( 'opacity', 0 );\n\t\t$( '#rightLogo, #topbar-company-logo' ).attr( 'src', ServiceCaller.getURLByObjectType( 'company_logo' ) );\n\n\t\t$( '#rightLogo, #topbar-company-logo' ).on( 'load', function() {\n\n\t\t\tvar ratio = 42 / $( this ).height();\n\n\t\t\tif ( $( this ).height() > 42 ) {\n\t\t\t\t$( this ).css( 'height', 42 );\n\n\t\t\t\tif ( $( this ).width > 177 ) {\n\t\t\t\t\t$( this ).css( 'width', 177 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $( this ).width > 177 ) {\n\t\t\t\t$( this ).css( 'width', 177 );\n\t\t\t}\n\n\t\t\t$( this ).animate( {\n\t\t\t\topacity: 1\n\t\t\t}, 100 );\n\t\t} );\n\t}\n\n\tsetErrorMenu() {\n\n\t\tvar context_menu_array = ContextMenuManager.getMenuModelByMenuId( this.determineContextMenuMountAttributes().id );\n\t\tvar len = context_menu_array.length;\n\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tlet context_btn = context_menu_array[i];\n\t\t\tlet id = context_menu_array[i].id;\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\n\t\t\tswitch ( id ) {\n\t\t\t\tcase 'cancel':\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\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\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\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\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\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': {\n\t\t\t\t'label': $.i18n._( 'Password Policy' ),\n\t\t\t\t'init_callback': 'initSubPasswordPolicyView',\n\t\t\t\t'html_template': this.getCompanyPasswordPolicyTabHtml(),\n\t\t\t},\n\t\t\t'tab_ldap': {\n\t\t\t\t'label': $.i18n._( 'LDAP Authentication' )\n\t\t\t},\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\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// Product Edition\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\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\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\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\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// Business/Employer ID Number\n//\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n//\t\tform_item_input.TTextInput( {field: 'business_number', width: 149} );\n//\t\tthis.addEditFieldToColumn( $.i18n._( 'Business/Employer ID Number' ), 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\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Address (Line 2)\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\t\tform_item_input.parent().width( '45%' );\n\n\t\t//City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\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\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\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\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\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\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\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} );\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\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} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Billing Contact' ), form_item_input, tab_company_column2 );\n\n\t\t// Primary Support contact\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\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} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Primary Support Contact' ), form_item_input, tab_company_column2 );\n\n\t\t// Company Settings\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.SEPARATED_BOX );\n\t\tform_item_input.SeparatedBox( { label: $.i18n._( 'Company Settings' ) } );\n\t\tthis.addEditFieldToColumn( null, form_item_input, tab_company_column2 );\n\n\t\t// Terminated User Disable Login Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'terminated_user_disable_login_type_id' } );\n\t\tform_item_input.setSourceData( $this.terminated_user_disable_login_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Disable Terminated Employees' ), form_item_input, tab_company_column2, '' );\n\n\t\t// Terminated User Disable Login After Days\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'terminated_user_disable_login_after_days', width: 25 } );\n\n\t\tvar terminated_user_disable_login_after_days_description = $( '
' );\n\t\tterminated_user_disable_login_after_days_description.append( form_item_input );\n\t\tterminated_user_disable_login_after_days_description.append( $( '( ' + $.i18n._( 'Days' ) + ' )' ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Disable Terminated Employees Login After' ), form_item_input, tab_company_column2, '', terminated_user_disable_login_after_days_description );\n\n\t\t// Logo\n\n\t\tif ( typeof FormData == 'undefined' ) {\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.IMAGE_BROWSER );\n\n\t\t\tthis.file_browser = form_item_input.TImageBrowser( { field: '', default_width: 128, default_height: 128 } );\n\n\t\t\tthis.file_browser.bind( 'imageChange', function( e, target ) {\n\t\t\t\tnew ServiceCaller().uploadFile( target.getValue(), 'object_type=company_logo', {\n\t\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\t\tif ( result.toLowerCase() === 'true' ) {\n\t\t\t\t\t\t\t$this.file_browser.setImage( ServiceCaller.getURLByObjectType( 'company_logo' ) );\n\t\t\t\t\t\t\t$this.updateCompanyLogo();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTAlertManager.showAlert( result, 'Error' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t} );\n\t\t} else {\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.IMAGE_AVD_BROWSER );\n\n\t\t\tthis.file_browser = form_item_input.TImageAdvBrowser( {\n\t\t\t\tfield: '', callBack: function( form_data ) {\n\t\t\t\t\tnew ServiceCaller().uploadFile( form_data, 'object_type=company_logo', {\n\t\t\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\t\t\tif ( result.toLowerCase() === 'true' ) {\n\t\t\t\t\t\t\t\t$this.file_browser.setImage( ServiceCaller.getURLByObjectType( 'company_logo' ) );\n\t\t\t\t\t\t\t\t$this.updateCompanyLogo();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tTAlertManager.showAlert( result, 'Error' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.is_edit || this.edit_only_mode ) {\n\t\t\tthis.file_browser.setEnableDelete( true );\n\t\t\tthis.file_browser.bind( 'deleteClick', function( e, target ) {\n\t\t\t\t$this.api.deleteImage( $this.current_edit_record.id, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t$this.initEditView( result );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Logo' ), this.file_browser, tab_company_column2, '', null, false, true );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( 'in Days' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( 'in Days' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( '(ie: ldap.example.com or ldaps://ldap.example.com for SSL)' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( '(ie: 389 or 636 for SSL)' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( 'Used to search for the user, for anonymous binding enter: anonymous' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( '(ie: ou=People,dc=example,dc=com)' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( 'For binding the LDAP user. (ie: AD/openLDAP: userPrincipalName, Mac OSX: uid)' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( 'Additional filter parameters. (ie: is_timetrex_user=1)' ) + '' );\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 = $( '
' );\n\t\tlabel = $( ' ' + $.i18n._( 'For searching the LDAP user. (ie: AD: sAMAccountName, openLDAP: dn, Mac OSX: dn)' ) + '' );\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\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\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\tgetCompanyPasswordPolicyTabHtml() {\n\t\treturn `
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
`;\n\t}\n\n}\n\n//\n//CompanyViewController.loadView = function() {\n//\n//\t Global.loadViewSource( 'Company', 'CompanyView.html', function( result ) {\n//\n//\t\t var args = {};\n//\t\t var template = _.template( result, args );\n//\n//\t\t Global.contentContainer().html( template );\n//\t } )\n//\n//};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDE2NC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQW9EO0FBQ0c7OztBQUdoRDtBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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