From ce49a8ab94d23423fe7e66bdea6fc0620304b4c7 Mon Sep 17 00:00:00 2001 From: Robert Barrow Date: Mon, 21 Oct 2019 11:56:36 +0100 Subject: [PATCH] new site setting to allow admin to choose the label cue to show national flag images when using the drop-down to select flag --- assets/javascripts/wizard/initializers/custom.js.es6 | 2 +- config/settings.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/wizard/initializers/custom.js.es6 b/assets/javascripts/wizard/initializers/custom.js.es6 index b7a89bd7..b7ea67ba 100644 --- a/assets/javascripts/wizard/initializers/custom.js.es6 +++ b/assets/javascripts/wizard/initializers/custom.js.es6 @@ -28,7 +28,7 @@ export default { isFlagSelector() { const field = this.get('field'); //TODO improve the way this detects a flag dropdown (currently it relies on the string 'Nation', e.g. 'Nationality' or 'National Flag' appearing in label) - return (field.label.includes('Nation')) ? true : false; + return (field.label.includes(Discourse.SiteSettings.wizard_national_flags_label_cue)) ? true : false; } }); diff --git a/config/settings.yml b/config/settings.yml index 2185676a..e99f28bd 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -12,3 +12,6 @@ plugins: refresh: true type: list list_type: compact + wizard_national_flags_label_cue: + client: true + default: "National"