mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge pull request #3316 from alchemy-fr/PHRAS-2894_Quarantine_allow_to_substitute_without_selecting_target-Record
PHRAS-2894 #comment merge Quarantine: allow to substitute without selecting target record, (when match only one record).
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user