diff --git a/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php b/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php index 342ee9e912..4439a8f15b 100644 --- a/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php +++ b/application/Espo/Core/FieldProcessing/EmailAddress/Saver.php @@ -152,7 +152,7 @@ class Saver implements SaverInterface $key = strtolower($emailAddressValue); if ($key && isset($hash->$key)) { - $hash->{$key}['optOut'] = $entity->get('emailAddressIsOptedOut'); + $hash->{$key}['optOut'] = (bool) $entity->get('emailAddressIsOptedOut'); } } @@ -170,7 +170,7 @@ class Saver implements SaverInterface $key = strtolower($emailAddressValue); if ($key && isset($hash->$key)) { - $hash->{$key}['invalid'] = $entity->get('emailAddressIsInvalid'); + $hash->{$key}['invalid'] = (bool) $entity->get('emailAddressIsInvalid'); } } diff --git a/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php b/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php index 1011bc5d46..0b93ac88b7 100644 --- a/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php +++ b/application/Espo/Core/FieldProcessing/PhoneNumber/Saver.php @@ -163,7 +163,7 @@ class Saver implements SaverInterface $key = $phoneNumberValue; if (isset($hash->$key)) { - $hash->{$key}['optOut'] = $entity->get('phoneNumberIsOptedOut'); + $hash->{$key}['optOut'] = (bool) $entity->get('phoneNumberIsOptedOut'); } } @@ -180,7 +180,7 @@ class Saver implements SaverInterface $key = $phoneNumberValue; if (isset($hash->$key)) { - $hash->{$key}['invalid'] = $entity->get('phoneNumberIsInvalid'); + $hash->{$key}['invalid'] = (bool) $entity->get('phoneNumberIsInvalid'); } } diff --git a/client/src/views/fields/email.js b/client/src/views/fields/email.js index a2f857797b..1c8699d56d 100644 --- a/client/src/views/fields/email.js +++ b/client/src/views/fields/email.js @@ -156,6 +156,7 @@ define('views/fields/email', ['views/fields/varchar'], function (Dep) { if (this.isReadMode()) { data.isOptedOut = this.model.get(this.isOptedOutFieldName); + data.isInvalid = this.model.get(this.isInvalidFieldName); if (this.model.get(this.name)) { data.isErased = this.model.get(this.name).indexOf(this.erasedPlaceholder) === 0 @@ -509,6 +510,7 @@ define('views/fields/email', ['views/fields/varchar'], function (Dep) { setup: function () { this.dataFieldName = this.name + 'Data'; this.isOptedOutFieldName = this.name + 'IsOptedOut'; + this.isInvalidFieldName = this.name + 'IsInvalid'; this.erasedPlaceholder = 'ERASED:'; @@ -555,6 +557,7 @@ define('views/fields/email', ['views/fields/varchar'], function (Dep) { data[this.dataFieldName] = addressData; data[this.name] = null; data[this.isOptedOutFieldName] = false; + data[this.isInvalidFieldName] = false; let primaryIndex = 0; @@ -565,6 +568,10 @@ define('views/fields/email', ['views/fields/varchar'], function (Dep) { if (item.optOut) { data[this.isOptedOutFieldName] = true; } + + if (item.invalid) { + data[this.isInvalidFieldName] = true; + } } }); @@ -579,6 +586,7 @@ define('views/fields/email', ['views/fields/varchar'], function (Dep) { data[this.name] = addressData[0].emailAddress; } else { data[this.isOptedOutFieldName] = null; + data[this.isInvalidFieldName] = null; } return data; diff --git a/client/src/views/fields/phone.js b/client/src/views/fields/phone.js index 8c9f87f747..1a62fa1e28 100644 --- a/client/src/views/fields/phone.js +++ b/client/src/views/fields/phone.js @@ -176,6 +176,7 @@ function (Dep, /** module:ui/select*/Select) { if (this.isReadMode()) { data.isOptedOut = this.model.get(this.isOptedOutFieldName); + data.isInvalid = this.model.get(this.isInvalidFieldName); if (this.model.get(this.name)) { data.isErased = this.model.get(this.name).indexOf(this.erasedPlaceholder) === 0; @@ -409,6 +410,7 @@ function (Dep, /** module:ui/select*/Select) { .get('entityDefs.' + this.model.name + '.fields.' + this.name + '.defaultType'); this.isOptedOutFieldName = this.name + 'IsOptedOut'; + this.isInvalidFieldName = this.name + 'IsInvalid'; this.phoneNumberOptedOutByDefault = this.getConfig().get('phoneNumberIsOptedOutByDefault'); @@ -468,6 +470,7 @@ function (Dep, /** module:ui/select*/Select) { data[this.dataFieldName] = addressData; data[this.name] = null; data[this.isOptedOutFieldName] = false; + data[this.isInvalidFieldName] = false; let primaryIndex = 0; @@ -478,6 +481,10 @@ function (Dep, /** module:ui/select*/Select) { if (item.optOut) { data[this.isOptedOutFieldName] = true; } + + if (item.invalid) { + data[this.isInvalidFieldName] = true; + } } }); @@ -492,6 +499,7 @@ function (Dep, /** module:ui/select*/Select) { data[this.name] = addressData[0].phoneNumber; } else { data[this.isOptedOutFieldName] = null; + data[this.isInvalidFieldName] = null; } return data; diff --git a/client/src/views/modals/detail.js b/client/src/views/modals/detail.js index 978baff233..902c69f242 100644 --- a/client/src/views/modals/detail.js +++ b/client/src/views/modals/detail.js @@ -715,6 +715,10 @@ define('views/modals/detail', ['views/modal', 'helpers/action-item-setup'], func return; } + if (e.target.tagName === 'TEXTAREA' || e.target.tagName === 'INPUT') { + return; + } + e.preventDefault(); e.stopPropagation(); @@ -734,6 +738,10 @@ define('views/modals/detail', ['views/modal', 'helpers/action-item-setup'], func return; } + if (e.target.tagName === 'TEXTAREA' || e.target.tagName === 'INPUT') { + return; + } + e.preventDefault(); e.stopPropagation(); diff --git a/client/src/views/portal/fields/tab-list.js b/client/src/views/portal/fields/tab-list.js index 9bae6e163f..9f90fb9907 100644 --- a/client/src/views/portal/fields/tab-list.js +++ b/client/src/views/portal/fields/tab-list.js @@ -26,21 +26,24 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('views/portal/fields/tab-list', 'views/settings/fields/tab-list', function (Dep) { +define('views/portal/fields/tab-list', ['views/settings/fields/tab-list'], function (Dep) { return Dep.extend({ + noGroups: true, + setupOptions: function () { Dep.prototype.setupOptions.call(this); - this.params.options = this.params.options.filter(function (tab) { - if (tab === '_delimiter_') return true; + this.params.options = this.params.options.filter(tab => { + if (tab === '_delimiter_') { + return true; + } + if (!!this.getMetadata().get('scopes.' + tab + '.aclPortal')) { return true; } - }, this); - } - + }); + }, }); - }); diff --git a/client/src/views/record/detail.js b/client/src/views/record/detail.js index 709a481633..7d82ce12fd 100644 --- a/client/src/views/record/detail.js +++ b/client/src/views/record/detail.js @@ -3965,6 +3965,10 @@ function (Dep, ViewRecordHelper, ActionItemSetup) { return; } + if (e.target.tagName === 'TEXTAREA' || e.target.tagName === 'INPUT') { + return; + } + let $button = this.$el.find('button[data-action="previous"]'); if (!$button.length || $button.hasClass('disabled')) { @@ -3994,6 +3998,10 @@ function (Dep, ViewRecordHelper, ActionItemSetup) { return; } + if (e.target.tagName === 'TEXTAREA' || e.target.tagName === 'INPUT') { + return; + } + let $button = this.$el.find('button[data-action="next"]'); if (!$button.length || $button.hasClass('disabled')) { diff --git a/composer.json b/composer.json index 94e8911771..2d72d2127d 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "yzalis/identicon": "*", "zordius/lightncandy": "dev-espo#v1.2.5e", "composer/semver": "^3", - "spatie/async": "1.5.3", + "spatie/async": "1.5.5", "tecnickcom/tcpdf": "6.3.5", "symfony/process": "4.4.*", "symfony/http-foundation": "4.4.*", diff --git a/composer.lock b/composer.lock index 0e98d40340..68fc35243c 100644 --- a/composer.lock +++ b/composer.lock @@ -1697,6 +1697,66 @@ ], "time": "2022-11-14T08:50:44+00:00" }, + { + "name": "laravel/serializable-closure", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2022-09-08T13:45:54+00:00" + }, { "name": "league/flysystem", "version": "2.1.1", @@ -4425,27 +4485,27 @@ }, { "name": "spatie/async", - "version": "1.5.3", + "version": "1.5.5", "source": { "type": "git", "url": "https://github.com/spatie/async.git", - "reference": "d371b76ff876530c4906596490fd977720477e48" + "reference": "742708736b1e6d606dd1cd0f60acb7e354211e41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/async/zipball/d371b76ff876530c4906596490fd977720477e48", - "reference": "d371b76ff876530c4906596490fd977720477e48", + "url": "https://api.github.com/repos/spatie/async/zipball/742708736b1e6d606dd1cd0f60acb7e354211e41", + "reference": "742708736b1e6d606dd1cd0f60acb7e354211e41", "shasum": "" }, "require": { - "opis/closure": "^3.4.2", - "php": "^7.1 || ^8.0", - "symfony/process": "^3.3 || ^4.0 || ^5.0" + "laravel/serializable-closure": "^1.0", + "php": "^7.4|^8.0", + "symfony/process": "^3.3 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "larapack/dd": "^1.1", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "symfony/stopwatch": "^4.0 || ^5.0" + "phpunit/phpunit": "^7.5 || ^8.5.21 || ^9.0", + "symfony/stopwatch": "^4.0 || ^5.0 || ^6.0" }, "suggest": { "ext-pcntl": "Required to use async processes", @@ -4480,7 +4540,7 @@ ], "support": { "issues": "https://github.com/spatie/async/issues", - "source": "https://github.com/spatie/async/tree/1.5.3" + "source": "https://github.com/spatie/async/tree/1.5.5" }, "funding": [ { @@ -4488,7 +4548,7 @@ "type": "github" } ], - "time": "2020-12-29T22:19:12+00:00" + "time": "2022-06-21T06:40:45+00:00" }, { "name": "symfony/deprecation-contracts", diff --git a/js/diff.js b/js/diff.js index 658eda53a4..6d84ed8ecf 100644 --- a/js/diff.js +++ b/js/diff.js @@ -82,6 +82,7 @@ class Diff let minorVersionNumber = version.split('.')[1]; let hotfixVersionNumber = version.split('.')[2]; + let majorVersionNumber = version.split('.')[0]; for (let i = 0; i < tagList.length; i++) { let tag = tagList[i]; @@ -105,16 +106,27 @@ class Diff } } + if (hotfixVersionNumber !== '0') { for (let i = 0; i < tagList.length; i++) { let tag = tagList[i]; let patchVersionNumberI = tag.split('.')[2]; + let minorVersionNumberI = tag.split('.')[1]; + let majorVersionNumberI = tag.split('.')[0]; - if (closest && parseInt(patchVersionNumberI) !== parseInt(hotfixVersionNumber) - 1) { - break; + if ( + closest && + ( + minorVersionNumberI !== minorVersionNumber || + majorVersionNumberI !== majorVersionNumber || + parseInt(patchVersionNumberI) !== parseInt(hotfixVersionNumber) - 1 + ) + ) { + continue; } + if (tag === version) { continue; } diff --git a/package-lock.json b/package-lock.json index efb4fef022..fc56f80cee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "espocrm", - "version": "7.3.2", + "version": "7.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "espocrm", - "version": "7.3.2", + "version": "7.3.3", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { diff --git a/package.json b/package.json index cfcbdf3b0f..a3e804690a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espocrm", - "version": "7.3.2", + "version": "7.3.3", "description": "Open-source CRM.", "repository": { "type": "git", diff --git a/upgrades/7.3/scripts/BeforeUpgrade.php b/upgrades/7.3/scripts/BeforeUpgrade.php index 06063982b1..031d47e6eb 100644 --- a/upgrades/7.3/scripts/BeforeUpgrade.php +++ b/upgrades/7.3/scripts/BeforeUpgrade.php @@ -102,6 +102,7 @@ class BeforeUpgrade 'assignedUserId' => $user->getId(), 'name' => $emailAddress . ' (auto-created)', 'emailAddress' => $emailAddress, + 'useImap' => false, 'useSmtp' => true, 'status' => 'Active', 'smtpHost' => $smtpServer,