PHRAS-2894 #comment Fix Quarantine allow to substitute without selecting target Record #time 2h"

git commit -m PHRAS-2894
This commit is contained in:
Harrys Ravalomanana
2020-01-31 14:15:56 +04:00
parent 8b66603905
commit a4a5fac254

View File

@@ -356,15 +356,20 @@
var elements = [];
var nbElement = 0;
if (nbProposals >= 1) {
if (nbProposals > 1) {
elements = $(".selected", container);
nbElement = elements.length;
} else {
return false;
} else if (nbProposals == 1) {
elements = $(".records-subititution > div", container);
} else {
return false;
}
if (nbElement === 0) {
if (nbElement === 0 && nbProposals > 1) {
alert(language.selectOneRecord);
return false;
} else if (nbElement > 1) {
alert(language.onlyOneRecord);