0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 11:00:28 +01:00

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:
merefield 2019-10-22 20:41:57 +01:00 committet von GitHub
Commit dd5bacfd0f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -28,7 +28,7 @@ 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;
} }
}); });

Datei anzeigen

@ -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"