Skip to content
Snippets Groups Projects
Commit 26d6ef6c authored by yvesn's avatar yvesn
Browse files

SSDM-5068 : ELN config on GUI - using display names instead of codes on UI

SVN: 38248
parent 750ce1a1
No related branches found
No related tags found
No related merge requests found
...@@ -220,7 +220,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) { ...@@ -220,7 +220,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
var allDatasetTypeCodes = this._settingsFormController.getAllDatasetTypeCodeOptions(); var allDatasetTypeCodes = this._settingsFormController.getAllDatasetTypeCodeOptions();
return FormUtil.getDropdown(allDatasetTypeCodes.map(function(option) { return FormUtil.getDropdown(allDatasetTypeCodes.map(function(option) {
return { return {
label : option, label : Util.getDisplayNameFromCode(option),
value : option, value : option,
selected : option === rowData.dataSetType, selected : option === rowData.dataSetType,
}; };
...@@ -251,7 +251,8 @@ function SettingsFormView(settingsFormController, settingsFormModel) { ...@@ -251,7 +251,8 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
for (var sampleType of this._profileToEdit.getAllSampleTypes()) { for (var sampleType of this._profileToEdit.getAllSampleTypes()) {
// layout // layout
var $div = $("<div>").css("padding-left", "15px"); var $div = $("<div>").css("padding-left", "15px");
var $sampleTypeFieldset = this._getFieldset($div, sampleType.code, "settings-section-sampletype-" + sampleType.code, true); var displayName = Util.getDisplayNameFromCode(sampleType.code);
var $sampleTypeFieldset = this._getFieldset($div, displayName, "settings-section-sampletype-" + sampleType.code, true);
$fieldset.append($div); $fieldset.append($div);
// table for sample type // table for sample type
var sampleTypeSettings = this._profileToEdit.sampleTypeDefinitionsExtension[sampleType.code]; var sampleTypeSettings = this._profileToEdit.sampleTypeDefinitionsExtension[sampleType.code];
...@@ -290,7 +291,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) { ...@@ -290,7 +291,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
var options = this._settingsFormController.getSampleTypeOptions(); var options = this._settingsFormController.getSampleTypeOptions();
return FormUtil.getDropdown(options.map(function(option) { return FormUtil.getDropdown(options.map(function(option) {
return { return {
label : option, label : Util.getDisplayNameFromCode(option),
value : option, value : option,
selected : option === rowData.TYPE, selected : option === rowData.TYPE,
}; };
...@@ -358,7 +359,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) { ...@@ -358,7 +359,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
var options = this._settingsFormController.getAnnotationPropertyTypeOptions(); var options = this._settingsFormController.getAnnotationPropertyTypeOptions();
return FormUtil.getDropdown(options.map(function(option) { return FormUtil.getDropdown(options.map(function(option) {
return { return {
label : option, label : Util.getDisplayNameFromCode(option),
value : option, value : option,
selected : option === rowData.TYPE, selected : option === rowData.TYPE,
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment