mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°1590: Advanced search: fixed a bug when selecting foreign keys would not add items (selectionMode is mandatory)
This commit is contained in:
@@ -464,9 +464,9 @@ class utils
|
||||
{
|
||||
$sSelectionMode = utils::ReadParam('selectionMode', '');
|
||||
|
||||
if ($sSelectionMode === '')
|
||||
if ($sSelectionMode != 'positive' && $sSelectionMode != 'negative')
|
||||
{
|
||||
throw new CoreException('selectionMode is mandatory');
|
||||
throw new CoreException('selectionMode must be either positive or negative');
|
||||
}
|
||||
|
||||
// Paginated selection
|
||||
|
||||
@@ -229,7 +229,7 @@ function SearchFormForeignKeys(id, sTargetClass, sAttCode, oSearchWidgetElmt, sF
|
||||
var selectionMode = $(':input[name="selectionMode"]', context);
|
||||
if (selectionMode.length > 0) {
|
||||
// Paginated table retrieve the mode and the exceptions
|
||||
theMap['selectionMode'] = selectionMode.val();
|
||||
theMap['selectionMode'] = (selectionMode.val() == 'negative') ? 'negative' : 'positive';
|
||||
$('#fs_SearchFormToAdd_'+me.id+' :input').each(function () {
|
||||
theMap[this.name] = this.value;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user