refs #4974 Minor changes

This commit is contained in:
Guillermo Bonet 2023-02-09 13:16:47 +01:00
parent e59bd6365d
commit c863737092
1 changed files with 15 additions and 12 deletions

View File

@ -127,18 +127,21 @@ var App = {
this.refreshLogout();
// Branch options
this.request('GET', 'mdbBranches', null, function(err, res) {
if (err)
throw new Error ('Version could not be retrieved: '+ err.message +': ');
var selectBranch = document.querySelector('#branch');
var option = [];
for (var x in res) {
option[x] = document.createElement('option');
option[x].text = res[x].name
option[x].value = res[x].name
selectBranch.options.add(option[x])
}
});
try {
this.request('GET', 'mdbBranches', null, function(err, res) {
var selectBranch = document.querySelector('#branch');
var option = [];
for (var x in res) {
option[x] = document.createElement('option');
option[x].text = res[x].name
option[x].value = res[x].name
selectBranch.options.add(option[x])
}
});
} catch (err) {
this.catchError(err);
}
var branch = this.mdbGetValue(
'SELECT branch FROM tblVariables',
'branch', String