Commit d273b771 authored by Christophe Maudoux's avatar Christophe Maudoux

Hide message boxes if needed (#1660)

parent 0209e736
......@@ -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 ->
......
......@@ -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')));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment