From 83390fc05c5c10ffeb2498e283944b0b97049ece Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 5 Sep 2019 17:07:22 +0200 Subject: [PATCH] Add a message when no configuration options are available --- js/control/Profile.js | 5 +++++ locales/en.json | 1 + 2 files changed, 6 insertions(+) diff --git a/js/control/Profile.js b/js/control/Profile.js index 9e1865d..a807ba6 100644 --- a/js/control/Profile.js +++ b/js/control/Profile.js @@ -190,6 +190,11 @@ BR.Profile = L.Evented.extend({ } var paramsSection = L.DomUtil.get('profile_params'); paramsSection.innerHTML = ''; + + if (!Object.keys(params).length) { + paramsSection.append(i18next.t('sidebar.profile.no_easy_configuration_warning')); + } + Object.keys(params).forEach(function(param) { var div = document.createElement('div'); var label = document.createElement('label'); diff --git a/locales/en.json b/locales/en.json index e64ea00..ad7ca4d 100644 --- a/locales/en.json +++ b/locales/en.json @@ -196,6 +196,7 @@ "profile": { "clear": "Clear", "help": "Help", + "no_easy_configuration_warning": "No easy configuration is available for this profile.", "placeholder": "Write your custom profile here.", "save": "Save", "switch_advanced": "Switch to advanced editor",