1 line
94 KiB
JavaScript
1 line
94 KiB
JavaScript
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["company-remittance_source_account-RemittanceSourceAccountViewController","filebrowser-TImage","filebrowser-TImageAdvBrowser"],{1469:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImage = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImage.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\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 null;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\tthis.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\tthis.attr( 'src', val + '&t=' + d.getTime() );\n\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} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImage.defaults = {};\n\n\t$( document ).on( 'mouseover', '.file-browser img', function( e ) {\n\t\tvar $this_image_widget = $( e.target ).parents( '.file-browser' );\n\n\t\tif ( !$( '.file_browser_overlay' )[0] && $( e.target ).attr( 'enable-delete' ) == 1 ) {\n\t\t\tvar height = $( e.target ).height();\n\t\t\tvar top = ( height - 32 ) / 2;\n\t\t\tvar left = top;\n\n\t\t\tvar file_browser_overlay = $( '<div class=\"file_browser_overlay\"><img src=\"theme/default/images/delete-512.png\" style=\"position:absolute;width:32px;height:32px;top:' + top + 'px;left:' + left + 'px;\"></div>' );\n\t\t\tfile_browser_overlay.css( 'position', 'absolute' );\n\t\t\tfile_browser_overlay.css( 'top', '0px' );\n\t\t\tfile_browser_overlay.css( 'left', '0' );\n\t\t\tfile_browser_overlay.css( 'cursor', 'pointer' );\n\t\t\tfile_browser_overlay.css( 'height', height + 'px' );\n\t\t\tfile_browser_overlay.css( 'width', '100%' );\n\t\t\tfile_browser_overlay.css( 'background', 'rgba(255,255,255,0.85)' );\n\n\t\t\t$( e.target ).parents( '.file-browser' ).append( file_browser_overlay );\n\n\t\t\t$( document ).on( 'click', '.file_browser_overlay', function( e ) {\n\t\t\t\tvar img_src = $( e.target ).parent().find( 'img' ).attr( 'src' );\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'This will permanently delete the image. Are you sure?' ), '', function( flag ) {\n\t\t\t\t\tif ( flag ) {\n\t\t\t\t\t\tvar e = { type: 'deleteClick', message: 'Delete image clicked.', time: new Date() };\n\t\t\t\t\t\t$this_image_widget.trigger( e );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t$( document ).on( 'mouseleave', '.file-browser', function() {\n\t\t\t\t$( document ).off( 'click', '.file_browser_overlay' );\n\t\t\t\tif ( $( '.file_browser_overlay' )[0] ) {\n\t\t\t\t\tvar file_browser_overlay = $( this ).find( '.file_browser_overlay' );\n\t\t\t\t\tfile_browser_overlay.off().remove();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ2OS5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQSxnQ0FBZ0M7O0FBRWhDOztBQU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oICdzcmMnICk7XG5cdFx0XHRcdFRBbGVydE1hbmFnZXIuc2hvd0NvbmZpcm1BbGVydCggJC5pMThuLl8oICdUaGlzIHdpbGwgcGVybWFuZW50bHkgZGVsZXRlIHRoZSBpbWFnZS4gQXJlIHlvdSBzdXJlPycgKSwgJycsIGZ1bmN0aW9uKCBmbGFnICkge1xuXHRcdFx0XHRcdGlmICggZmxhZyApIHtcblx0XHRcdFx0XHRcdHZhciBlID0geyB0eXBlOiAnZGVsZXRlQ2xpY2snLCBtZXNzYWdlOiAnRGVsZXRlIGltYWdlIGNsaWNrZWQuJywgdGltZTogbmV3IERhdGUoKSB9O1xuXHRcdFx0XHRcdFx0JHRoaXNfaW1hZ2Vfd2lkZ2V0LnRyaWdnZXIoIGUgKTtcblx0XHRcdFx0XHR9XG5cdFx0XHRcdH0gKTtcblx0XHRcdH0gKTtcblxuXHRcdFx0JCggZG9jdW1lbnQgKS5vbiggJ21vdXNlbGVhdmUnLCAnLmZpbGUtYnJvd3NlcicsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkKCBkb2N1bWVudCApLm9mZiggJ2NsaWNrJywgJy5maWxlX2Jyb3dzZXJfb3ZlcmxheScgKTtcblx0XHRcdFx0aWYgKCAkKCAnLmZpbGVfYnJvd3Nlcl9vdmVybGF5JyApWzBdICkge1xuXHRcdFx0XHRcdHZhciBmaWxlX2Jyb3dzZXJfb3ZlcmxheSA9ICQoIHRoaXMgKS5maW5kKCAnLmZpbGVfYnJvd3Nlcl9vdmVybGF5JyApO1xuXHRcdFx0XHRcdGZpbGVfYnJvd3Nlcl9vdmVybGF5Lm9mZigpLnJlbW92ZSgpO1xuXHRcdFx0XHR9XG5cdFx0XHR9ICk7XG5cdFx0fVxuXHR9ICk7XG5cbn0gKSggalF1ZXJ5ICk7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1469\n")},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<div class=\"file-browser\">\n\t\t<img class=\"image\">\n\t\t<button id=\"upload_image\" class=\"t-button file-browser-btn\" style=\"display: block\"></button>\n\t</div>\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQU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SA9IGZvcm1fZGF0YTtcblxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9ICk7XG5cblx0XHRcdGltYWdlID0gJCggdGhpcyApLmNoaWxkcmVuKCkuZXEoIDAgKTtcblx0XHRcdGltYWdlLm9uKCAnbG9hZCcsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkdGhpcy5vbkltYWdlTG9hZCggdGhpcyApO1xuXHRcdFx0fSApO1xuXG5cdFx0XHRpbWFnZS5oaWRlKCk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uVEltYWdlQWR2QnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUFkdkJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxidXR0b24gaWQ9XCJ1cGxvYWRfaW1hZ2VcIiBjbGFzcz1cInQtYnV0dG9uIGZpbGUtYnJvd3Nlci1idG5cIiBzdHlsZT1cImRpc3BsYXk6IGJsb2NrXCI+PC9idXR0b24+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},3401:(__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 */ \"RemittanceSourceAccountViewController\": () => (/* binding */ RemittanceSourceAccountViewController)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1469);\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImage__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\nclass RemittanceSourceAccountViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#remittance_source_account_view_container',\n\n\t\t\tstatus_array: null,\n\t\t\ttype_array: null,\n\t\t\tcountry_array: null,\n\t\t\tdata_format_array: null,\n\t\t\tach_transaction_type_array: null,\n\t\t\tach_transaction_type_data: null,\n\t\t\tcompany_api: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit() {\n\t\t//this._super('initialize' );\n\t\tthis.edit_view_tpl = 'RemittanceSourceAccountEditView.html';\n\t\tthis.permission_id = 'remittance_source_account';\n\t\tthis.viewId = 'RemittanceSourceAccount';\n\t\tthis.script_name = 'RemittanceSourceAccountView';\n\t\tthis.table_name_key = 'remittance_source_account';\n\t\tthis.context_menu_name = $.i18n._( 'Remittance Source Accounts' );\n\t\tthis.navigation_label = $.i18n._( 'Remittance Source Account' );\n\t\tthis.api = TTAPI.APIRemittanceSourceAccount;\n\t\tthis.company_api = TTAPI.APICompany;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\n\t\t$( '#tab_advanced_content_div .edit-view-form-item-div .edit-view-form-item-label-div' ).css( 'border-top-left-radius', '0px' );\n\t\t$( '#tab_advanced_content_div .edit-view-form-item-div:first .edit-view-form-item-label-div' ).css( 'border-top-left-radius', '5px' );\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tvar options = [\n\t\t\t{ option_name: 'status', api: this.api },\n\t\t\t{ option_name: 'type', api: this.api },\n\t\t\t{ option_name: 'country', field_name: 'country', api: this.company_api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tthis.api.getOptions( 'ach_transaction_type', {\n\t\t\tonResult: function( res ) {\n\t\t\t\tvar result = res.getResult();\n\t\t\t\t$this.ach_transaction_type_data = result;\n\t\t\t\t$this.ach_transaction_type_array = Global.buildRecordArray( result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetSignatureUrl() {\n\t\tvar url = false;\n\t\tif ( this.current_edit_record.id ) {\n\t\t\turl = Global.getBaseURL() + '../send_file.php?api=1&object_type=remittance_source_account&object_id=' + this.current_edit_record.id;\n\t\t}\n\t\tDebug.Text( url, 'RemittanceSourceAccountViewController.js', 'RemittanceSourceAccountViewController', 'getSignatureUrl', 10 );\n\t\treturn url;\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.file_browser.setImage( this.getSignatureUrl() );\n\t}\n\n\tuniformVariable( record ) {\n\t\t//ensure that the variable variable fields are set to false if they aren't showing.\n\t\tif ( this.edit_view_ui_dic && this.current_edit_record.remittance_source_account_id != TTUUID.zero_id ) { //Keep accountd data if UUID == zero_id\n\t\t\tfor ( var i = 1; i <= 10; i++ ) {\n\t\t\t\tif ( i == 1 ) {\n\t\t\t\t\tif ( this.edit_view_ui_dic['country'].getValue() == 'US' ) {\n\t\t\t\t\t\tif ( this.edit_view_ui_dic['value1_2'] ) {\n\t\t\t\t\t\t\trecord['value1'] = record['value1_2'] ? record['value1_2'] : this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( this.edit_view_ui_dic['value1_1'] ) {\n\t\t\t\t\t\t\trecord['value1'] = record['value1_1'] ? record['value1_1'] : this.edit_view_ui_dic['value1_1'].getValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( !this.is_mass_editing && record['value' + i] && ( typeof this.edit_view_ui_dic['value' + i] == 'undefined' ) ) {\n\t\t\t\t\t\trecord['value' + i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn record;\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['export_excel'],\n\t\t\tinclude: [\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._( 'Sample File' ),\n\t\t\t\t\tid: 'export_export',\n\t\t\t\t\taction_group: 'other',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\tvue_icon: 'tticon tticon-file_download_black_24dp',\n\t\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 'export_export':\n\t\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\t\tthis.setMenuExportIcon( 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 'export_export':\n\t\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\t\tthis.setMenuExportIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetMenuExportIcon( context_btn ) {\n\t\t//do not show for edit screens or non-grid screens.\n\t\tif ( this.getSelectedItems().length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else if ( this.edit_only_mode || this.grid == undefined || this.sub_view_mode ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tonExportClick() {\n\t\tvar post_data = { 0: this.getGridSelectIdArray() };\n\t\tGlobal.APIFileDownload( this.api.className, 'testExport', post_data );\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\t\tvar c_value = target.getValue();\n\n\t\tswitch ( key ) {\n\t\t\tcase 'value1_1':\n\t\t\tcase 'value1_2':\n\t\t\t\tthis.current_edit_record['value1'] = c_value;\n\t\t\t\tbreak;\n\t\t\tcase 'country':\n\t\t\tcase 'type_id':\n\t\t\t\tthis.onTypeChange();\n\t\t\t\tbreak;\n\t\t\tcase 'data_format_id':\n\t\t\t\tthis.onDataFormatChange();\n\t\t\t\tbreak;\n\t\t\tcase 'value24':\n\t\t\t\tif ( c_value != false ) {\n\t\t\t\t\tthis.attachElement( 'value25' ).text( $.i18n._( 'Offset Description' ) );\n\t\t\t\t\tthis.attachElement( 'value27' ).text( $.i18n._( 'Offset Routing' ) );\n\t\t\t\t\tthis.attachElement( 'value28' ).text( $.i18n._( 'Offset Account' ) );\n\t\t\t\t\tif ( this.edit_view_ui_dic.value25.getValue().length == 0 ) {\n\t\t\t\t\t\tthis.edit_view_ui_dic.value25.setValue( 'OFFSET' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.detachElement( 'value25' );\n\t\t\t\t\tthis.detachElement( 'value27' );\n\t\t\t\t\tthis.detachElement( 'value28' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tfor ( var evud_key in this.edit_view_ui_dic ) {\n\t\t\tthis.current_edit_record[evud_key] = this.edit_view_ui_dic[evud_key].getValue();\n\t\t}\n\n\t\tthis.current_edit_record[key] = c_value;\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'export_export':\n\t\t\t\tthis.onExportClick();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonSaveClick( ignoreWarning ) {\n\t\tsuper.onSaveClick( ignoreWarning );\n\t\tGlobal.clearCache( 'getOptions_type' ); //Needs to clear cache so if they add a source account of a new type, it will immediately appear in the Type dropdown for Payment Methods.\n\t}\n\n\tattachElement( key ) {\n\t\t//Error: Uncaught TypeError: Cannot read property 'insertBefore' of undefined in interface/html5/views/BaseViewController.js?v=9.0.0-20150822-210544 line 6439\n\t\tif ( !this.edit_view_form_item_dic || !this.edit_view_form_item_dic[key] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar place_holder = $( '.place_holder_' + key );\n\t\tthis.edit_view_form_item_dic[key].insertBefore( place_holder );\n\t\tplace_holder.remove();\n\n\t\treturn $( this.edit_view_form_item_dic[key].find( '.edit-view-form-item-label' ) );\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.current_edit_record ) {\n\n\t\t\tif ( !this.current_edit_record.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar widget = this.edit_view_ui_dic[key];\n\n\t\t\tif ( key === 'value1' && this.current_edit_record[key] && !this.is_mass_editing ) {\n\t\t\t\tif ( Global.isSet( this.ach_transaction_type_data[this.current_edit_record[key]] ) ) {\n\t\t\t\t\tthis.edit_view_ui_dic['value1_2'].setValue( this.current_edit_record[key] );\n\t\t\t\t} else {\n\t\t\t\t\tthis.edit_view_ui_dic['value1_1'].setValue( this.current_edit_record[key] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'value1_1':\n\t\t\t\t\tcase 'value1_2':\n\t\t\t\t\t break;\n\t\t\t\t\tcase 'type_id': //popular case\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tthis.onTypeChange();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'data_format_id': //popular case\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tthis.onDataFormatChange();\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\tonDataFormatChange() {\n\t\tvar $this = this;\n\t\tvar type_id = this.edit_view_ui_dic.type_id.getValue();\n\t\tvar data_format_id = this.edit_view_ui_dic.data_format_id.getValue();\n\n\t\t//alert(' DataFormatChange: Type: '+ type_id + ' Data Format: '+ data_format_id );\n\n\t\tif ( type_id == false || data_format_id == false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$( this.edit_view_tab.find( 'ul li' )[1] ).hide(); //Hide Advanced tab\n\n\t\tthis.detachElement( 'value4' );\n\t\tthis.detachElement( 'value5' );\n\t\tthis.detachElement( 'value6' );\n\t\tthis.detachElement( 'value7' );\n\t\tthis.detachElement( 'value8' );\n\t\tthis.detachElement( 'value9' );\n\t\tthis.detachElement( 'value10' );\n\t\tthis.detachElement( 'value11' );\n\t\tthis.detachElement( 'value12' );\n\t\tthis.detachElement( 'value13' );\n\t\tthis.detachElement( 'value14' );\n\t\tthis.detachElement( 'value15' );\n\t\tthis.detachElement( 'value16' );\n\t\tthis.detachElement( 'value17' );\n\t\tthis.detachElement( 'value18' );\n\t\tthis.detachElement( 'value19' );\n\t\tthis.detachElement( 'value20' );\n\t\tthis.detachElement( 'value21' );\n\t\tthis.detachElement( 'value22' );\n\t\tthis.detachElement( 'value23' );\n\t\tthis.detachElement( 'value24' );\n\t\tthis.detachElement( 'value25' );\n\t\tthis.detachElement( 'value26' );\n\t\tthis.detachElement( 'value27' );\n\t\tthis.detachElement( 'value28' );\n\t\tthis.detachElement( 'value29' );\n\t\tthis.detachElement( 'value30' );\n\n\t\tthis.detachElement( 'signature' );\n\t\tthis.edit_view_ui_dic.value5.parent().find( '.mm_field_unit_text' ).remove();\n\t\tthis.edit_view_ui_dic.value6.parent().find( '.mm_field_unit_text' ).remove();\n\t\tif ( type_id != 2000 ) {\n\t\t\tTTPromise.wait( null, null, function() {\n\t\t\t\t$this.edit_view_ui_dic.value5.setWidth( 200 );\n\t\t\t\t$this.edit_view_ui_dic.value6.setWidth( 200 );\n\t\t\t} );\n\t\t}\n\n\t\tif ( type_id == 2000 ) {\n\t\t\tif ( Global.getProductEdition() >= 15 ) { //All cheque formats.\n\t\t\t\t$( this.edit_view_tab.find( 'ul li' )[1] ).show(); //Show Advanced Tab\n\n\t\t\t\tthis.attachElement( 'value5' ).text( $.i18n._( 'Vertical Alignment' ) );\n\t\t\t\tthis.attachElement( 'value6' ).text( $.i18n._( 'Horizontal Alignment' ) );\n\t\t\t\tthis.attachElement( 'signature' );\n\n\t\t\t\tthis.edit_view_ui_dic.value5.parent().append( '<span class=\"mm_field_unit_text\"> mm</span>' );\n\t\t\t\tthis.edit_view_ui_dic.value6.parent().append( '<span class=\"mm_field_unit_text\"> mm</span>' );\n\n\t\t\t\tTTPromise.wait( null, null, function() {\n\t\t\t\t\tif ( $this.edit_view_ui_dic && $this.edit_view_ui_dic.value5 ) {\n\t\t\t\t\t\t$this.edit_view_ui_dic.value5.setWidth( 42 );\n\t\t\t\t\t}\n\t\t\t\t\tif ( $this.edit_view_ui_dic && $this.edit_view_ui_dic.value6 ) {\n\t\t\t\t\t\t$this.edit_view_ui_dic.value6.setWidth( 42 );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else if ( type_id == 3000 ) {\n\t\t\tif ( data_format_id == 5 ) { //TimeTrex Remittances\n\t\t\t\t// this.attachElement('value5').text($.i18n._('User Name') );\n\t\t\t\t// this.attachElement('value6').text($.i18n._('API Key') );\n\t\t\t} else if ( data_format_id == 10 ) { //US - ACH\n\t\t\t\t$( this.edit_view_tab.find( 'ul li' )[1] ).show(); //Show Advanced Tab\n\n\t\t\t\tthis.attachElement( 'value4' ).text( $.i18n._( 'Business Number' ) );\n\t\t\t\tthis.attachElement( 'value5' ).text( $.i18n._( 'Immediate Origin' ) );\n\t\t\t\tthis.attachElement( 'value6' ).text( $.i18n._( 'Immediate Origin Name' ) );\n\t\t\t\tthis.attachElement( 'value7' ).text( $.i18n._( 'Immediate Dest.' ) );\n\t\t\t\tthis.attachElement( 'value8' ).text( $.i18n._( 'Immediate Dest. Name' ) );\n\t\t\t\tthis.attachElement( 'value9' ).text( $.i18n._( 'Trace Number' ) );\n\t\t\t\tthis.attachElement( 'value10' ).text( $.i18n._( 'Discretionary Data' ) );\n\t\t\t\tthis.attachElement( 'value11' ).text( $.i18n._( 'Company Name' ) );\n\n\t\t\t\tthis.attachElement( 'value24' ).text( $.i18n._( 'Offset Transaction' ) );\n\t\t\t\tif ( this.current_edit_record.value24 == 1 ) {\n\t\t\t\t\tthis.current_edit_record.value24 = true;\n\t\t\t\t\tthis.attachElement( 'value25' ).text( $.i18n._( 'Offset Description' ) );\n\t\t\t\t\tthis.attachElement( 'value27' ).text( $.i18n._( 'Offset Routing' ) );\n\t\t\t\t\tthis.attachElement( 'value28' ).text( $.i18n._( 'Offset Account' ) );\n\t\t\t\t}\n\t\t\t\tthis.attachElement( 'value29' ).text( $.i18n._( 'File Header Line' ) );\n\t\t\t\tthis.attachElement( 'value30' ).text( $.i18n._( 'File Trailer Line' ) );\n\t\t\t} else if ( data_format_id == 20 || data_format_id == 30 || data_format_id == 50 ) { //CA - EFT\n\t\t\t\t$( this.edit_view_tab.find( 'ul li' )[1] ).show(); //Show Advanced Tab\n\n\t\t\t\tthis.attachElement( 'value5' ).text( $.i18n._( 'Originator ID' ) );\n\t\t\t\tthis.attachElement( 'value6' ).text( $.i18n._( 'Originator Short Name' ) );\n\t\t\t\tthis.attachElement( 'value7' ).text( $.i18n._( 'Data Center ID' ) );\n\t\t\t\t//this.attachElement( 'value7' ).text( $.i18n._('Data Center Name') );\n\n\t\t\t\tthis.attachElement( 'value26' ).text( $.i18n._( 'Return Institution' ) );\n\t\t\t\tthis.attachElement( 'value27' ).text( $.i18n._( 'Return Transit' ) );\n\t\t\t\tthis.attachElement( 'value28' ).text( $.i18n._( 'Return Account' ) );\n\t\t\t\tthis.attachElement( 'value29' ).text( $.i18n._( 'File Header Line' ) );\n\t\t\t\tthis.attachElement( 'value30' ).text( $.i18n._( 'File Trailer Line' ) );\n\t\t\t}\n\t\t}\n\t}\n\n\tonTypeChange() {\n\t\tvar $this = this;\n\t\tvar type_id = this.edit_view_ui_dic.type_id.getValue();\n\t\tvar country = ( this.edit_view_ui_dic.country.getValue() && this.edit_view_ui_dic.country.getValue() != TTUUID.zero_id ) ? this.edit_view_ui_dic.country.getValue() : this.current_edit_record.country; //sometimes it's false for no reason.\n\n\t\t$( this.edit_view_tab.find( 'ul li' )[1] ).show(); //Show Advanced tab\n\n\t\tthis.detachElement( 'data_format_id' );\n\t\tthis.detachElement( 'last_transaction_number' );\n\t\tthis.detachElement( 'value1_1' );\n\t\tthis.detachElement( 'value1_2' );\n\t\t//this.detachElement( 'value1' );\n\t\tthis.detachElement( 'value2' );\n\t\tthis.detachElement( 'value3' );\n\n\t\tif ( country == false || type_id == false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type_id == 2000 ) {\n\t\t\tthis.attachElement( 'last_transaction_number' ).text( $.i18n._( 'Last Check Number' ) );\n\t\t} else if ( type_id == 3000 ) {\n\t\t\tthis.attachElement( 'last_transaction_number' ).text( $.i18n._( 'Last Batch Number' ) );\n\n\t\t\tif ( !this.is_mass_editing && country != null ) {\n\t\t\t\tif ( country == 'US' ) { //ACH\n\t\t\t\t\tthis.attachElement( 'value1_2' ).text( $.i18n._( 'Account Type' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Routing' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t\tif ( Global.isFalseOrNull( this.current_edit_record['value1'] ) ) {\n\t\t\t\t\t\tthis.current_edit_record['value1'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t\tthis.current_edit_record['value1_2'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t}\n\t\t\t\t} else if ( country == 'CA' ) { //Canadian EFT\n\t\t\t\t\tthis.attachElement( 'value1_1' ).text( $.i18n._( 'Institution' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Bank Transit' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t} else if ( $.inArray( country, ['AG', 'BS', 'BB', 'BZ', 'DO', 'GY', 'HT', 'JM', 'DM', 'GD', 'KN', 'LC', 'VC', 'SR', 'TT'] ) != -1 ) { //Carribbean countries.\n\t\t\t\t\tthis.attachElement( 'value1_1' ).text( $.i18n._( 'Institution' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Bank Transit' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t} else {\n\t\t\t\t\tthis.attachElement( 'value1_2' ).text( $.i18n._( 'Account Type' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Routing' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t\tif ( Global.isFalseOrNull( this.current_edit_record['value1'] ) ) {\n\t\t\t\t\t\tthis.current_edit_record['value1'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t\tthis.current_edit_record['value1_2'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$( '#tab_advanced_content_div .edit-view-form-item-div .edit-view-form-item-label-div' ).css( 'border-top-left-radius', '0px' );\n\t\t$( '#tab_advanced_content_div .edit-view-form-item-div:first .edit-view-form-item-label-div' ).css( 'border-top-left-radius', '5px' );\n\n\t\tvar $this = this;\n\t\tthis.api.getOptions( 'data_format', { 'type_id': type_id, 'country': country }, {\n\t\t\tasync: false,\n\t\t\tonResult: function( res ) {\n\t\t\t\t$this.attachElement( 'data_format_id' );\n\t\t\t\tvar result = res.getResult();\n\n\t\t\t\t$this.data_format_array = Global.buildRecordArray( result );\n\n\t\t\t\tif ( Global.isSet( $this.basic_search_field_ui_dic['data_format_id'] ) ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['data_format_id'].setSourceData( $this.data_format_array );\n\t\t\t\t}\n\n\t\t\t\tif ( Global.isSet( $this.adv_search_field_ui_dic['data_format_id'] ) ) {\n\t\t\t\t\t$this.adv_search_field_ui_dic['data_format_id'].setSourceData( $this.data_format_array );\n\t\t\t\t}\n\n\t\t\t\t$this.edit_view_ui_dic['data_format_id'].setSourceData( $this.data_format_array );\n\t\t\t\tif ( $this.current_edit_record['data_format_id'] && result[$this.current_edit_record['data_format_id']] ) {\n\t\t\t\t\t$this.edit_view_ui_dic['data_format_id'].setValue( $this.current_edit_record['data_format_id'] );\n\t\t\t\t} else {\n\t\t\t\t\t$this.current_edit_record['data_format_id'] = $this.edit_view_ui_dic['data_format_id'].getValue();\n\t\t\t\t}\n\n\t\t\t\t$this.onDataFormatChange();\n\t\t\t}\n\t\t} );\n\n\t\tthis.editFieldResize();\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_remittance_source_account': { 'label': $.i18n._( 'Remittance Source Account' ) },\n\t\t\t'tab_advanced': {\n\t\t\t\t'label': $.i18n._( 'Advanced' )\n\t\t\t},\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRemittanceSourceAccount,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_remittance_source_account',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//Tab 0 start\n\t\tvar tab_remittance_source_account = this.edit_view_tab.find( '#tab_remittance_source_account' );\n\t\tvar tab_remittance_source_account_column1 = tab_remittance_source_account.find( '.first-column' );\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( tab_remittance_source_account_column1 );\n\n\t\t//Advanced tab\n\t\tvar tab_advanced = this.edit_view_tab.find( '#tab_advanced' );\n\t\tvar tab_advanced_column1 = tab_advanced.find( '.first-column' );\n\t\tthis.edit_view_tabs[1] = [];\n\t\tthis.edit_view_tabs[1].push( tab_advanced_column1 );\n\n\t\t// Legal Entity\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APILegalEntity,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_legal_entity',\n\t\t\tfield: 'legal_entity_id',\n\t\t\t//set_empty: true,\n\t\t\tset_any: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Legal Entity' ), form_item_input, tab_remittance_source_account_column1, '' );\n\n\t\t//Status\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\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_remittance_source_account_column1, '' );\n\n\t\t// 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._( 'Name' ), form_item_input, tab_remittance_source_account_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Description\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description' ), form_item_input, tab_remittance_source_account_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//TYPE\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'type_id' } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_remittance_source_account_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_remittance_source_account_column1 );\n\n\t\t// Currency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APICurrency,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_currency',\n\t\t\tfield: 'currency_id',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Currency' ), form_item_input, tab_remittance_source_account_column1 );\n\n\t\t// Data Format\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'data_format_id' } );\n\t\tform_item_input.setSourceData( $this.data_format_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Format' ), form_item_input, tab_remittance_source_account_column1, '', null, true );\n\n\t\t// Last Transaction Number\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'last_transaction_number', width: '60' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Last Transaction Number' ), form_item_input, tab_remittance_source_account_column1, '', null, true );\n\n\n\t\t//generate Value# fields 1-30\n\t\t//shorter and easier to read than 150 extra lines\n\t\tfor ( var i = 1; i <= 30; i++ ) {\n\t\t\tvar width = '200';\n\n\t\t\tvar type_id = this.edit_view_ui_dic.type_id.getValue();\n\t\t\tif ( type_id == 2000 && Global.getProductEdition() >= 15 && ( i == 5 || i == 6 ) ) { //5=Vertical Alignment, 6=Horizaontal Alignment\n\t\t\t\twidth = 42;\n\t\t\t}\n\n\t\t\tif ( i == 29 || i == 30 ) { //29: file header line. 30: file trailer line.\n\t\t\t\twidth = '500';\n\t\t\t}\n\t\t\tvar tab_for_values = tab_remittance_source_account_column1;\n\t\t\tif ( i > 3 ) {\n\t\t\t\ttab_for_values = tab_advanced_column1;\n\t\t\t}\n\n\t\t\tif ( i == 1 ) { //ACH\n\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\t\tform_item_input.TTextInput( { field: 'value1_1', validation_field: 'value1', width: width } );\n\t\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value' + i ), form_item_input, tab_for_values, '', null, true );\n\n\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\t\t\tform_item_input.TComboBox( { field: 'value1_2', validation_field: 'value1' } );\n\t\t\t\tform_item_input.setSourceData( $this.ach_transaction_type_array );\n\t\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value' + i ), form_item_input, tab_for_values, '', null, true );\n\t\t\t} else {\n\t\t\t\tif ( i == 24 ) { //24: Offset Transaction\n\t\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\t\t\tform_item_input.TCheckbox( { field: 'value' + i } );\n\t\t\t\t} else {\n\t\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\t\t\tform_item_input.TTextInput( { field: 'value' + i, width: width } );\n\t\t\t\t}\n\t\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value' + i ), form_item_input, tab_for_values, '', null, true );\n\t\t\t}\n\n\t\t}\n\n\t\t//Signature Upload\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( {\n\t\t\t\tfield: 'signature',\n\t\t\t\tdefault_width: 256,\n\t\t\t\tdefault_height: 47\n\t\t\t} );\n\n\t\t\tthis.file_browser.bind( 'imageChange', function( e, target ) {\n\t\t\t\tnew ServiceCaller().uploadFile( target.getValue(), 'object_type=remittance_source_account&object_id=' + $this.current_edit_record.id, {\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( $this.getSignatureUrl() );\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: 'signature', callBack: function( form_data ) {\n\t\t\t\t\tnew ServiceCaller().uploadFile( form_data, 'object_type=remittance_source_account&object_id=' + $this.current_edit_record.id, {\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( $this.getSignatureUrl() );\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 ) {\n\t\t\tthis.attachElement( 'signature' );\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.onDeleteImage();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.detachElement( 'signature' );\n\t\t}\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Signature' ), this.file_browser, tab_advanced_column1, '', null, true, true );\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._( 'Legal Entity' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'legal_entity_id',\n\t\t\t\tlayout_name: 'global_legal_entity',\n\t\t\t\tapi_class: TTAPI.APILegalEntity,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tscript_name: 'LegalEntityView',\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._( '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: false,\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._( '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: false,\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: 3,\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: true,\n\t\t\t\tadv_search: false,\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: 3,\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: true,\n\t\t\t\tadv_search: false,\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}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQwMS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQTZDO0FBQ1U7O0FBRWhEO0FBQ1AsMkJBQTJCO0FBQzNCLEVBQUUsQ0FBQztBQUNIOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTs7QUFFSjtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMkJBQTJCLENBQUM7QUFDNUIsMEJBQTBCLENBQUM7QUFDM0I7QUFDQTs7Q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