Add a message when no configuration options are available

This commit is contained in:
Phyks (Lucas Verney) 2019-09-05 17:07:22 +02:00
parent ff86c85a8a
commit 83390fc05c
2 changed files with 6 additions and 0 deletions

View file

@ -190,6 +190,11 @@ BR.Profile = L.Evented.extend({
} }
var paramsSection = L.DomUtil.get('profile_params'); var paramsSection = L.DomUtil.get('profile_params');
paramsSection.innerHTML = ''; paramsSection.innerHTML = '';
if (!Object.keys(params).length) {
paramsSection.append(i18next.t('sidebar.profile.no_easy_configuration_warning'));
}
Object.keys(params).forEach(function(param) { Object.keys(params).forEach(function(param) {
var div = document.createElement('div'); var div = document.createElement('div');
var label = document.createElement('label'); var label = document.createElement('label');

View file

@ -196,6 +196,7 @@
"profile": { "profile": {
"clear": "Clear", "clear": "Clear",
"help": "Help", "help": "Help",
"no_easy_configuration_warning": "No easy configuration is available for this profile.",
"placeholder": "Write your custom profile here.", "placeholder": "Write your custom profile here.",
"save": "Save", "save": "Save",
"switch_advanced": "Switch to advanced editor", "switch_advanced": "Switch to advanced editor",