From 3c756e625242597e18c005f341b0a2dea39262d6 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 9 Aug 2024 10:59:57 +0300 Subject: [PATCH] ref --- .../inbound-email/fields/email-address.js | 27 +- .../src/views/inbound-email/fields/folder.js | 1 + .../src/views/inbound-email/fields/folders.js | 1 + .../fields/target-user-position.js | 79 ++-- .../inbound-email/fields/test-connection.js | 10 +- .../views/inbound-email/fields/test-send.js | 37 +- .../src/views/inbound-email/record/detail.js | 414 +++++++++--------- client/src/views/inbound-email/record/edit.js | 67 ++- client/src/views/inbound-email/record/list.js | 15 +- .../views/outbound-email/fields/test-send.js | 16 + 10 files changed, 339 insertions(+), 328 deletions(-) diff --git a/client/src/views/inbound-email/fields/email-address.js b/client/src/views/inbound-email/fields/email-address.js index 7c771b7ef4..2f1809fdad 100644 --- a/client/src/views/inbound-email/fields/email-address.js +++ b/client/src/views/inbound-email/fields/email-address.js @@ -26,22 +26,21 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/fields/email-address', ['views/fields/email-address'], function (Dep) { +import EmailAddressFieldView from 'views/fields/email-address'; - return Dep.extend({ +export default class extends EmailAddressFieldView { - setup: function () { - Dep.prototype.setup.call(this); + setup() { + super.setup(); - this.on('change', () => { - var emailAddress = this.model.get('emailAddress'); + this.on('change', () => { + const emailAddress = this.model.get('emailAddress'); - this.model.set('name', emailAddress); + this.model.set('name', emailAddress); - if (this.model.isNew() || !this.model.get('replyToAddress')) { - this.model.set('replyToAddress', emailAddress); - } - }); - }, - }); -}); + if (this.model.isNew() || !this.model.get('replyToAddress')) { + this.model.set('replyToAddress', emailAddress); + } + }); + } +} diff --git a/client/src/views/inbound-email/fields/folder.js b/client/src/views/inbound-email/fields/folder.js index e22cc76760..611ec39074 100644 --- a/client/src/views/inbound-email/fields/folder.js +++ b/client/src/views/inbound-email/fields/folder.js @@ -30,5 +30,6 @@ import FolderView from 'views/email-account/fields/folder'; export default class extends FolderView { + // noinspection JSUnusedGlobalSymbols getFoldersUrl = 'InboundEmail/action/getFolders' } diff --git a/client/src/views/inbound-email/fields/folders.js b/client/src/views/inbound-email/fields/folders.js index d9d86fe89b..b44e5142a3 100644 --- a/client/src/views/inbound-email/fields/folders.js +++ b/client/src/views/inbound-email/fields/folders.js @@ -30,5 +30,6 @@ import FoldersView from 'views/email-account/fields/folders'; export default class extends FoldersView { + // noinspection JSUnusedGlobalSymbols getFoldersUrl = 'InboundEmail/action/getFolders' } diff --git a/client/src/views/inbound-email/fields/target-user-position.js b/client/src/views/inbound-email/fields/target-user-position.js index fc7a1a4d52..46a6f1c254 100644 --- a/client/src/views/inbound-email/fields/target-user-position.js +++ b/client/src/views/inbound-email/fields/target-user-position.js @@ -26,57 +26,54 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/fields/target-user-position', ['views/fields/enum'], function (Dep) { +import EnumFieldView from 'views/fields/enum'; - return Dep.extend({ +export default class extends EnumFieldView { - setup: function () { - Dep.prototype.setup.call(this); + setup() { + super.setup(); - this.translatedOptions = { - '': '--' + this.translate('All') + '--' - }; + this.translatedOptions = {'': `--${this.translate('All')}--`}; - this.params.options = ['']; + this.params.options = ['']; - if (this.model.get('targetUserPosition') && this.model.get('teamId')) { - this.params.options.push(this.model.get('targetUserPosition')); - } + if (this.model.get('targetUserPosition') && this.model.get('teamId')) { + this.params.options.push(this.model.get('targetUserPosition')); + } - this.loadRoleList(() => { - if (this.mode === 'edit') { - if (this.isRendered()) { - this.render(); - } - } - }); - - this.listenTo(this.model, 'change:teamId', () => { - this.loadRoleList(() => { + this.loadRoleList(() => { + if (this.mode === this.MODE_EDIT) { + if (this.isRendered()) { this.render(); - }); - }); - }, - - loadRoleList: function (callback, context) { - var teamId = this.model.get('teamId'); - - if (!teamId) { - this.params.options = ['']; + } } + }); - this.getModelFactory().create('Team', (team) => { - team.id = teamId; + this.listenTo(this.model, 'change:teamId', () => { + this.loadRoleList(() => this.render()); + }); + } - this.listenToOnce(team, 'sync', () => { - this.params.options = team.get('positionList') || []; - this.params.options.unshift(''); + /** + * @private + * @param {function} callback + */ + loadRoleList(callback) { + const teamId = this.model.attributes.teamId; - callback.call(context); - }); + if (!teamId) { + this.params.options = ['']; + } - team.fetch(); + this.getModelFactory().create('Team', /** import('model').default */team => { + team.id = teamId; + + team.fetch().then(() => { + this.params.options = team.get('positionList') || []; + this.params.options.unshift(''); + + callback.call(this); }); - }, - }); -}); + }); + } +} diff --git a/client/src/views/inbound-email/fields/test-connection.js b/client/src/views/inbound-email/fields/test-connection.js index fa1010de19..3a35cb60a2 100644 --- a/client/src/views/inbound-email/fields/test-connection.js +++ b/client/src/views/inbound-email/fields/test-connection.js @@ -26,10 +26,10 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/fields/test-connection', ['views/email-account/fields/test-connection'], function (Dep) { +import TestConnectionView from 'views/email-account/fields/test-connection'; - return Dep.extend({ +export default class extends TestConnectionView { + + url = 'InboundEmail/action/testConnection' +} - url: 'InboundEmail/action/testConnection', - }); -}); diff --git a/client/src/views/inbound-email/fields/test-send.js b/client/src/views/inbound-email/fields/test-send.js index 53ba4e5ba6..bb9efa1f5a 100644 --- a/client/src/views/inbound-email/fields/test-send.js +++ b/client/src/views/inbound-email/fields/test-send.js @@ -26,24 +26,23 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/fields/test-send', ['views/email-account/fields/test-send'], function (Dep) { +import TestSendView from 'views/email-account/fields/test-send'; - return Dep.extend({ +export default class extends TestSendView { - getSmtpData: function () { - return { - 'server': this.model.get('smtpHost'), - 'port': this.model.get('smtpPort'), - 'auth': this.model.get('smtpAuth'), - 'security': this.model.get('smtpSecurity'), - 'username': this.model.get('smtpUsername'), - 'password': this.model.get('smtpPassword') || null, - 'authMechanism': this.model.get('smtpAuthMechanism'), - 'fromName': this.model.get('fromName'), - 'fromAddress': this.model.get('emailAddress'), - 'type': 'inboundEmail', - 'id': this.model.id, - }; - }, - }); -}); + getSmtpData() { + return { + server: this.model.get('smtpHost'), + port: this.model.get('smtpPort'), + auth: this.model.get('smtpAuth'), + security: this.model.get('smtpSecurity'), + username: this.model.get('smtpUsername'), + password: this.model.get('smtpPassword') || null, + authMechanism: this.model.get('smtpAuthMechanism'), + fromName: this.model.get('fromName'), + fromAddress: this.model.get('emailAddress'), + type: 'inboundEmail', + id: this.model.id, + }; + } +} diff --git a/client/src/views/inbound-email/record/detail.js b/client/src/views/inbound-email/record/detail.js index 17610c39d2..4d1ec06555 100644 --- a/client/src/views/inbound-email/record/detail.js +++ b/client/src/views/inbound-email/record/detail.js @@ -26,22 +26,23 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/record/detail', ['views/record/detail'], function (Dep) { +import DetailRecordView from 'views/record/detail'; - return Dep.extend({ +export default class extends DetailRecordView { - setup: function () { - Dep.prototype.setup.call(this); + setup() { + super.setup(); - this.setupFieldsBehaviour(); - this.initSslFieldListening(); - }, + this.setupFieldsBehaviour(); + this.initSslFieldListening(); + } - modifyDetailLayout: function (layout) { - layout.filter(panel => panel.tabLabel === '$label:SMTP').forEach(panel => { + modifyDetailLayout(layout) { + layout.filter(panel => panel.tabLabel === '$label:SMTP') + .forEach(panel => { panel.rows.forEach(row => { row.forEach(item => { - let labelText = this.translate(item.name, 'fields', 'InboundEmail'); + const labelText = this.translate(item.name, 'fields', 'InboundEmail'); if (labelText && labelText.indexOf('SMTP ') === 0) { item.labelText = Espo.Utils.upperCaseFirst(labelText.substring(5)); @@ -49,242 +50,241 @@ define('views/inbound-email/record/detail', ['views/record/detail'], function (D }); }) }); - }, + } - wasFetched: function () { - if (!this.model.isNew()) { - return !!((this.model.get('fetchData') || {}).lastUID); - } + wasFetched() { + if (!this.model.isNew()) { + return !!((this.model.get('fetchData') || {}).lastUID); + } - return false; - }, + return false; + } - initSmtpFieldsControl: function () { - this.controlSmtpFields(); - this.controlSentFolderField(); - this.listenTo(this.model, 'change:useSmtp', this.controlSmtpFields, this); - this.listenTo(this.model, 'change:smtpAuth', this.controlSmtpFields, this); - this.listenTo(this.model, 'change:storeSentEmails', this.controlSentFolderField, this); - }, + initSmtpFieldsControl() { + this.controlSmtpFields(); + this.controlSentFolderField(); + this.listenTo(this.model, 'change:useSmtp', this.controlSmtpFields, this); + this.listenTo(this.model, 'change:smtpAuth', this.controlSmtpFields, this); + this.listenTo(this.model, 'change:storeSentEmails', this.controlSentFolderField, this); + } - controlSmtpFields: function () { - if (this.model.get('useSmtp')) { - this.showField('smtpHost'); - this.showField('smtpPort'); - this.showField('smtpAuth'); - this.showField('smtpSecurity'); - this.showField('smtpTestSend'); - this.showField('fromName'); - this.showField('smtpIsShared'); - this.showField('smtpIsForMassEmail'); - this.showField('storeSentEmails'); + controlSmtpFields() { + if (this.model.get('useSmtp')) { + this.showField('smtpHost'); + this.showField('smtpPort'); + this.showField('smtpAuth'); + this.showField('smtpSecurity'); + this.showField('smtpTestSend'); + this.showField('fromName'); + this.showField('smtpIsShared'); + this.showField('smtpIsForMassEmail'); + this.showField('storeSentEmails'); - this.setFieldRequired('smtpHost'); - this.setFieldRequired('smtpPort'); + this.setFieldRequired('smtpHost'); + this.setFieldRequired('smtpPort'); - this.controlSmtpAuthField(); + this.controlSmtpAuthField(); - return; - } + return; + } - this.hideField('smtpHost'); - this.hideField('smtpPort'); - this.hideField('smtpAuth'); - this.hideField('smtpUsername'); - this.hideField('smtpPassword'); - this.hideField('smtpAuthMechanism'); - this.hideField('smtpSecurity'); - this.hideField('smtpTestSend'); - this.hideField('fromName'); - this.hideField('smtpIsShared'); - this.hideField('smtpIsForMassEmail'); - this.hideField('storeSentEmails'); - this.hideField('sentFolder'); + this.hideField('smtpHost'); + this.hideField('smtpPort'); + this.hideField('smtpAuth'); + this.hideField('smtpUsername'); + this.hideField('smtpPassword'); + this.hideField('smtpAuthMechanism'); + this.hideField('smtpSecurity'); + this.hideField('smtpTestSend'); + this.hideField('fromName'); + this.hideField('smtpIsShared'); + this.hideField('smtpIsForMassEmail'); + this.hideField('storeSentEmails'); + this.hideField('sentFolder'); - this.setFieldNotRequired('smtpHost'); - this.setFieldNotRequired('smtpPort'); - this.setFieldNotRequired('smtpUsername'); - }, + this.setFieldNotRequired('smtpHost'); + this.setFieldNotRequired('smtpPort'); + this.setFieldNotRequired('smtpUsername'); + } - controlSentFolderField: function () { - if (this.model.get('useSmtp') && this.model.get('storeSentEmails')) { - this.showField('sentFolder'); - this.setFieldRequired('sentFolder'); + controlSentFolderField() { + if (this.model.get('useSmtp') && this.model.get('storeSentEmails')) { + this.showField('sentFolder'); + this.setFieldRequired('sentFolder'); - return; - } + return; + } - this.hideField('sentFolder'); - this.setFieldNotRequired('sentFolder'); - }, + this.hideField('sentFolder'); + this.setFieldNotRequired('sentFolder'); + } - controlSmtpAuthField: function () { - if (this.model.get('smtpAuth')) { - this.showField('smtpUsername'); - this.showField('smtpPassword'); - this.showField('smtpAuthMechanism'); - this.setFieldRequired('smtpUsername'); + controlSmtpAuthField() { + if (this.model.get('smtpAuth')) { + this.showField('smtpUsername'); + this.showField('smtpPassword'); + this.showField('smtpAuthMechanism'); + this.setFieldRequired('smtpUsername'); - return; - } + return; + } - this.hideField('smtpUsername'); - this.hideField('smtpPassword'); - this.hideField('smtpAuthMechanism'); - this.setFieldNotRequired('smtpUsername'); - }, + this.hideField('smtpUsername'); + this.hideField('smtpPassword'); + this.hideField('smtpAuthMechanism'); + this.setFieldNotRequired('smtpUsername'); + } - controlStatusField: function () { - let list = ['username', 'port', 'host', 'monitoredFolders']; - - if (this.model.get('status') === 'Active' && this.model.get('useImap')) { - list.forEach(item => { - this.setFieldRequired(item); - }); - - return; - } + controlStatusField() { + const list = ['username', 'port', 'host', 'monitoredFolders']; + if (this.model.get('status') === 'Active' && this.model.get('useImap')) { list.forEach(item => { - this.setFieldNotRequired(item); - }); - }, - - setupFieldsBehaviour: function () { - this.controlStatusField(); - - this.listenTo(this.model, 'change:status', (model, value, o) => { - if (o.ui) { - this.controlStatusField(); - } + this.setFieldRequired(item); }); - this.listenTo(this.model, 'change:useImap', (model, value, o) => { - if (o.ui) { - this.controlStatusField(); - } - }); + return; + } - if (this.wasFetched()) { - this.setFieldReadOnly('fetchSince'); + list.forEach(item => { + this.setFieldNotRequired(item); + }); + } + + setupFieldsBehaviour() { + this.controlStatusField(); + + this.listenTo(this.model, 'change:status', (model, value, o) => { + if (o.ui) { + this.controlStatusField(); + } + }); + + this.listenTo(this.model, 'change:useImap', (model, value, o) => { + if (o.ui) { + this.controlStatusField(); + } + }); + + if (this.wasFetched()) { + this.setFieldReadOnly('fetchSince'); + } else { + this.setFieldNotReadOnly('fetchSince'); + } + + this.initSmtpFieldsControl(); + + const handleRequirement = (model) => { + if (model.get('createCase')) { + this.showField('caseDistribution'); } else { - this.setFieldNotReadOnly('fetchSince'); + this.hideField('caseDistribution'); } - this.initSmtpFieldsControl(); + if ( + model.get('createCase') && + ['Round-Robin', 'Least-Busy'].indexOf(model.get('caseDistribution')) !== -1 + ) { + this.setFieldRequired('team'); + this.showField('targetUserPosition'); + } else { + this.setFieldNotRequired('team'); + this.hideField('targetUserPosition'); + } - let handleRequirement = (model) => { - if (model.get('createCase')) { - this.showField('caseDistribution'); - } else { - this.hideField('caseDistribution'); - } + if (model.get('createCase') && 'Direct-Assignment' === model.get('caseDistribution')) { + this.setFieldRequired('assignToUser'); + this.showField('assignToUser'); + } else { + this.setFieldNotRequired('assignToUser'); + this.hideField('assignToUser'); + } - if ( - model.get('createCase') && - ['Round-Robin', 'Least-Busy'].indexOf(model.get('caseDistribution')) !== -1 - ) { - this.setFieldRequired('team'); - this.showField('targetUserPosition'); - } else { - this.setFieldNotRequired('team'); - this.hideField('targetUserPosition'); - } + if (model.get('createCase') && model.get('createCase') !== '') { + this.showField('team'); + } else { + this.hideField('team'); + } + }; - if (model.get('createCase') && 'Direct-Assignment' === model.get('caseDistribution')) { - this.setFieldRequired('assignToUser'); - this.showField('assignToUser'); - } else { - this.setFieldNotRequired('assignToUser'); - this.hideField('assignToUser'); - } + this.listenTo(this.model, 'change:createCase', (model, value, o) => { + handleRequirement(model); - if (model.get('createCase') && model.get('createCase') !== '') { - this.showField('team'); - } else { - this.hideField('team'); - } - }; + if (!o.ui) { + return; + } - this.listenTo(this.model, 'change:createCase', (model, value, o) => { - handleRequirement(model); + if (!model.get('createCase')) { + this.model.set({ + caseDistribution: '', + teamId: null, + teamName: null, + assignToUserId: null, + assignToUserName: null, + targetUserPosition: '', + }); + } + }); + + handleRequirement(this.model); + + this.listenTo(this.model, 'change:caseDistribution', (model, value, o) => { + handleRequirement(model); + + if (!o.ui) { + return; + } + + setTimeout(() => { + if (!this.model.get('caseDistribution')) { + this.model.set({ + assignToUserId: null, + assignToUserName: null, + targetUserPosition: '' + }); - if (!o.ui) { return; } - if (!model.get('createCase')) { + if (this.model.get('caseDistribution') === 'Direct-Assignment') { this.model.set({ - caseDistribution: '', - teamId: null, - teamName: null, - assignToUserId: null, - assignToUserName: null, targetUserPosition: '', }); } - }); - handleRequirement(this.model); + this.model.set({ + assignToUserId: null, + assignToUserName: null, + }); + }, 10); + }); + } - this.listenTo(this.model, 'change:caseDistribution', (model, value, o) => { - handleRequirement(model); + initSslFieldListening() { + this.listenTo(this.model, 'change:security', (model, value, o) => { + if (!o.ui) { + return; + } - if (!o.ui) { - return; - } + if (value) { + this.model.set('port', 993); + } else { + this.model.set('port', 143); + } + }); - setTimeout(() => { - if (!this.model.get('caseDistribution')) { - this.model.set({ - assignToUserId: null, - assignToUserName: null, - targetUserPosition: '' - }); + this.listenTo(this.model, 'change:smtpSecurity', (model, value, o) => { + if (!o.ui) { + return; + } - return; - } - - if (this.model.get('caseDistribution') === 'Direct-Assignment') { - this.model.set({ - targetUserPosition: '', - }); - } - - this.model.set({ - assignToUserId: null, - assignToUserName: null, - }); - }, 10); - }); - }, - - initSslFieldListening: function () { - this.listenTo(this.model, 'change:security', (model, value, o) => { - if (!o.ui) { - return; - } - - if (value) { - this.model.set('port', 993); - } else { - this.model.set('port', 143); - } - }); - - this.listenTo(this.model, 'change:smtpSecurity', (model, value, o) => { - if (!o.ui) { - return; - } - - if (value === 'SSL') { - this.model.set('smtpPort', 465); - } else if (value === 'TLS') { - this.model.set('smtpPort', 587); - } else { - this.model.set('smtpPort', 25); - } - }); - }, - }); -}); + if (value === 'SSL') { + this.model.set('smtpPort', 465); + } else if (value === 'TLS') { + this.model.set('smtpPort', 587); + } else { + this.model.set('smtpPort', 25); + } + }); + } +} diff --git a/client/src/views/inbound-email/record/edit.js b/client/src/views/inbound-email/record/edit.js index d949ae4486..aa4ff91c0a 100644 --- a/client/src/views/inbound-email/record/edit.js +++ b/client/src/views/inbound-email/record/edit.js @@ -26,48 +26,47 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/record/edit', ['views/record/edit', 'views/inbound-email/record/detail'], -function (Dep, Detail) { +import EditRecordView from 'views/record/edit'; +import Detail from 'views/inbound-email/record/detail'; - return Dep.extend({ +export default class extends EditRecordView { - setup: function () { - Dep.prototype.setup.call(this); + setup() { + super.setup(); - Detail.prototype.setupFieldsBehaviour.call(this); - Detail.prototype.initSslFieldListening.call(this); + Detail.prototype.setupFieldsBehaviour.call(this); + Detail.prototype.initSslFieldListening.call(this); - if (Detail.prototype.wasFetched.call(this)) { - this.setFieldReadOnly('fetchSince'); - } - }, + if (Detail.prototype.wasFetched.call(this)) { + this.setFieldReadOnly('fetchSince'); + } + } - modifyDetailLayout: function (layout) { - Detail.prototype.modifyDetailLayout.call(this, layout); - }, + modifyDetailLayout(layout) { + Detail.prototype.modifyDetailLayout.call(this, layout); + } - controlStatusField: function () { - Detail.prototype.controlStatusField.call(this); - }, + controlStatusField() { + Detail.prototype.controlStatusField.call(this); + } - initSmtpFieldsControl: function () { - Detail.prototype.initSmtpFieldsControl.call(this); - }, + initSmtpFieldsControl() { + Detail.prototype.initSmtpFieldsControl.call(this); + } - controlSmtpFields: function () { - Detail.prototype.controlSmtpFields.call(this); - }, + controlSmtpFields() { + Detail.prototype.controlSmtpFields.call(this); + } - controlSentFolderField: function () { - Detail.prototype.controlSentFolderField.call(this); - }, + controlSentFolderField() { + Detail.prototype.controlSentFolderField.call(this); + } - controlSmtpAuthField: function () { - Detail.prototype.controlSmtpAuthField.call(this); - }, + controlSmtpAuthField() { + Detail.prototype.controlSmtpAuthField.call(this); + } - wasFetched: function () { - Detail.prototype.wasFetched.call(this); - }, - }); -}); + wasFetched() { + Detail.prototype.wasFetched.call(this); + } +} diff --git a/client/src/views/inbound-email/record/list.js b/client/src/views/inbound-email/record/list.js index e6294be8cc..a1fbaf10f0 100644 --- a/client/src/views/inbound-email/record/list.js +++ b/client/src/views/inbound-email/record/list.js @@ -26,13 +26,12 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/inbound-email/record/list', ['views/record/list'], function (Dep) { +import ListRecordView from 'views/record/list'; - return Dep.extend({ +export default class extends ListRecordView { - quickDetailDisabled: true, - quickEditDisabled: true, - massActionList: ['remove', 'massUpdate'], - checkAllResultDisabled: true, - }); -}); + quickDetailDisabled = true + quickEditDisabled = true + massActionList = ['remove', 'massUpdate'] + checkAllResultDisabled = true +} diff --git a/client/src/views/outbound-email/fields/test-send.js b/client/src/views/outbound-email/fields/test-send.js index dff38061b9..7af7bbc404 100644 --- a/client/src/views/outbound-email/fields/test-send.js +++ b/client/src/views/outbound-email/fields/test-send.js @@ -44,6 +44,9 @@ export default class extends BaseFieldView { return {}; } + /** + * @protected + */ checkAvailability() { if (this.model.get('smtpServer')) { this.$el.find('button').removeClass('hidden'); @@ -62,6 +65,10 @@ export default class extends BaseFieldView { }); } + /** + * @protected + * @return {Record} + */ getSmtpData() { return { 'server': this.model.get('smtpServer'), @@ -76,14 +83,23 @@ export default class extends BaseFieldView { }; } + /** + * @protected + */ enableButton() { this.$el.find('button').removeClass('disabled').removeAttr('disabled'); } + /** + * @protected + */ disabledButton() { this.$el.find('button').addClass('disabled').attr('disabled', 'disabled'); } + /** + * @private + */ send() { const data = this.getSmtpData();