mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
ToolForm: More batch mode validation logic
This commit is contained in:
@@ -145,14 +145,12 @@ return Backbone.Model.extend({
|
||||
}
|
||||
|
||||
// check number of inputs
|
||||
if (n > 1) {
|
||||
if (batch_n === -1) {
|
||||
batch_n = n;
|
||||
} else {
|
||||
if (batch_n !== n) {
|
||||
this._foundError(input_id, 'Please make sure that you select the same number or a single input for all batch mode fields. This field contains <b>' + n + '</b> selection(s) while a previous field contains <b>' + batch_n + '</b>.');
|
||||
return false;
|
||||
}
|
||||
if (batch_n === -1) {
|
||||
batch_n = n;
|
||||
} else {
|
||||
if (batch_n !== n) {
|
||||
this._foundError(input_id, 'Please make sure that you select the same number of inputs for all batch mode fields. This field contains <b>' + n + '</b> selection(s) while a previous field contains <b>' + batch_n + '</b>.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ var View = Backbone.View.extend({
|
||||
|
||||
// prepare result dict
|
||||
var result = {
|
||||
batch : !this.options.multiple && (this.current == 'collection' || id_list.length > 1),
|
||||
batch : !this.options.multiple && this.current != 'single',
|
||||
values : []
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user