VRFS-782 fix validation bug
This commit is contained in:
parent
3fd187c88f
commit
f93685aaff
|
|
@ -696,7 +696,7 @@
|
|||
|
||||
function validateAudioSettings(allowEmptyInput) {
|
||||
var isValid = true;
|
||||
var noTrackErrMsg = 'You must assign at least one input port to each of your tracks. Please update your settings to correct this.';
|
||||
var noTrackErrMsg = 'You can assign no more than 2 input ports to each of your tracks. Please update your settings to correct this.';
|
||||
var noInstrumentErrMsg = 'You must specify what instrument is being played for each track. Please update your settings to correct this.';
|
||||
var outputErrMsg = 'You must assign two output ports for stereo session audio to hear music. Please update your settings to correct this.';
|
||||
|
||||
|
|
@ -725,12 +725,14 @@
|
|||
|
||||
// if Track 2 exists, verify Input and Instrument exist
|
||||
if (isValid) {
|
||||
if ($('#track2-input > option').size() > 2) {
|
||||
var track2Count = $('#track2-input > option').size();
|
||||
if (track2Count > 2) {
|
||||
errMsg = noTrackErrMsg;
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if (isValid && $('#track2-instrument > option:selected').length === 0) {
|
||||
// only validate instrument if second track is selected
|
||||
if (isValid && track2Count > 0 && $('#track2-instrument > option:selected').length === 0) {
|
||||
errMsg = noInstrumentErrMsg;
|
||||
isValid = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue