Merge pull request #19 from merefield/juless_extensions
FIX: gracefully deal with lack of field label for dropdown and add settings key value.
Dieser Commit ist enthalten in:
Commit
dd5bacfd0f
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
|
@ -28,8 +28,8 @@ export default {
|
||||||
isFlagSelector() {
|
isFlagSelector() {
|
||||||
const field = this.get('field');
|
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)
|
//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(Discourse.SiteSettings.wizard_national_flags_label_cue)) ? true : false;
|
return (typeof field.label !== 'undefined') ? (field.label.includes(Discourse.SiteSettings.wizard_national_flags_label_cue)) ? true : false : false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,3 +23,4 @@ en:
|
||||||
site_settings:
|
site_settings:
|
||||||
wizard_redirect_exclude_paths: "Routes excluded from wizard redirects."
|
wizard_redirect_exclude_paths: "Routes excluded from wizard redirects."
|
||||||
wizard_recognised_image_upload_formats: "File types which will result in upload displaying an image preview"
|
wizard_recognised_image_upload_formats: "File types which will result in upload displaying an image preview"
|
||||||
|
wizard_national_flags_label_cue: "The characters that must appear in the dropdown field label for it to show a flag"
|
Laden …
In neuem Issue referenzieren