Hide message boxes if needed (#1660)

This commit is contained in:
Christophe Maudoux 2019-02-26 23:03:30 +01:00
parent 0209e7364b
commit d273b7710d
3 changed files with 10 additions and 2 deletions

View File

@ -29,6 +29,9 @@ translatePage = (lang) ->
$(this).text txt
$("[trmsg]").each ->
$(this).text translate "PE#{$(this).attr 'trmsg'}"
msg = translate "PE#{$(this).attr 'trmsg'}"
if msg.match /_null_/
$(this).parent().hide()
$("[trplaceholder]").each ->
$(this).attr 'placeholder', translate($(this).attr('trplaceholder'))
$("[localtime]").each ->

View File

@ -37,7 +37,12 @@ LemonLDAP::NG Portal jQuery scripts
return $(this).text(txt);
});
$("[trmsg]").each(function() {
return $(this).text(translate("PE" + ($(this).attr('trmsg'))));
var msg;
$(this).text(translate("PE" + ($(this).attr('trmsg'))));
msg = translate("PE" + ($(this).attr('trmsg')));
if (msg.match(/_null_/)) {
return $(this).parent().hide();
}
});
$("[trplaceholder]").each(function() {
return $(this).attr('placeholder', translate($(this).attr('trplaceholder')));

File diff suppressed because one or more lines are too long