From cf0aada1c1cd14f0c887a2289a1c763a59d26be1 Mon Sep 17 00:00:00 2001
From: Juan Fuentes <juanf@bs-mbpr28.d.ethz.ch>
Date: Mon, 20 May 2019 11:08:51 +0200
Subject: [PATCH] SSDM-8232 : SHOW_ON_NAV and SHOW settings fixes

---
 .../js/views/SettingsForm/SettingsFormView.js | 20 ++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js
index d73f1b11bce..b6a1cf01bb1 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js
@@ -446,9 +446,13 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
 				enabled : sampleTypeSettings["ENABLE_STORAGE"]
 			});
 			tableModel.addRow({
-				name : "Show",
+				name : "Show on Drop-down",
 				enabled : sampleTypeSettings["SHOW"]
 			});
+			tableModel.addRow({
+                name : "Show on Navigation",
+                enabled : sampleTypeSettings["SHOW_ON_NAV"]
+            });
 		} else { // default values
 			tableModel.addRow({
 				name : "Use as Protocol",
@@ -458,6 +462,14 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
 				name : "Enable Storage",
 				enabled : false
 			});
+			tableModel.addRow({
+                name : "Show on Drop-down",
+                enabled : false
+            });
+            tableModel.addRow({
+                name : "Show on Navigation",
+                enabled : false
+            });
 		}
 		// transform output
 		tableModel.valuesTransformer = function(values) {
@@ -467,9 +479,11 @@ function SettingsFormView(settingsFormController, settingsFormModel) {
 					settings["USE_AS_PROTOCOL"] = rowValues["enabled"];
 				} else if (rowValues["Options"] === "Enable Storage") {
 					settings["ENABLE_STORAGE"] = rowValues["enabled"];
-				} else if (rowValues["Options"] === "Show") {
+				} else if (rowValues["Options"] === "Show on Drop-down") {
 					settings["SHOW"] = rowValues["enabled"];
-				}
+				} else if (rowValues["Options"] === "Show on Navigation") {
+                    settings["SHOW_ON_NAV"] = rowValues["enabled"];
+                }
 			}
 			return settings;
 		}
-- 
GitLab