display the admin's supported languages inline in the support ticket form

pull/1/head
ansuz 5 years ago
parent c6722f849f
commit c9ed27c652

@ -17,5 +17,13 @@
display: flex; display: flex;
flex-flow: column; flex-flow: column;
.cp-support-language-list {
.cp-support-language {
margin-left: 5px;
background-color: rgba(0, 0, 0, 0.1);
padding: 0 5px;
}
}
} }

@ -139,20 +139,20 @@ define([
if (!Array.isArray(AppConfig.supportLanguages)) { return $(h('div')); } if (!Array.isArray(AppConfig.supportLanguages)) { return $(h('div')); }
var languages = AppConfig.supportLanguages; var languages = AppConfig.supportLanguages;
var list = h('li', languages var list = h('span.cp-support-language-list', languages
.map(function (lang) { .map(function (lang) {
return Messages._languages[lang]; return Messages._languages[lang];
}) })
.filter(Boolean) .filter(Boolean)
.map(function (lang) { .map(function (lang) {
return h('li', lang); return h('span.cp-support-language', lang);
}) })
); );
var preamble = "This server's administrators speak the following languages:"; // XXX Messages.support_languagesPreamble = "This server's administrators speak the following languages:"; // XXX
var $div = $( var $div = $(
h('div.cp-support-language', [ h('div.cp-support-language', [
preamble, Messages.support_languagesPreamble,
list, list,
]) ])
); );

Loading…
Cancel
Save