Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion data/web/inc/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@
}
}


// Workaround to get text with <br> straight to twig.
// Using "nl2br" doesn't work with Twig as it would escape everything by default.
if (isset($UI_TEXTS["ui_footer"])) {
$UI_TEXTS["ui_footer"] = nl2br($UI_TEXTS["ui_footer"]);
}

$globalVariables = [
'mailcow_hostname' => getenv('MAILCOW_HOSTNAME'),
Expand Down
14 changes: 9 additions & 5 deletions data/web/js/build/013-mailcow.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ $(document).ready(function() {
$.notify({message: msg},{z_index: 20000, delay: auto_hide, type: type,placement: {from: "bottom",align: "right"},animate: {enter: 'animated fadeInUp',exit: 'animated fadeOutDown'}});
}

$(".generate_password").click(async function( event ) {
try {
$(".generate_password").click(async function( event ) {
try {
var password_policy = await window.fetch("/api/v1/get/passwordpolicy", { method:'GET', cache:'no-cache' });
var password_policy = await password_policy.json();
random_passwd_length = password_policy.length;
Expand All @@ -48,7 +48,11 @@ $(document).ready(function() {
})
}
$(".rot-enc").html(function(){
return str_rot13($(this).html())
footer_html = $(this).html();
footer_html = footer_html.replace(/&lt;/g, '<').replace(/&gt;/g, '>')
.replace(/&amp;/g, '&').replace(/&nzc;/g, '&')
.replace(/&quot;/g, '"').replace(/&#x27;/g, "'");
return str_rot13(footer_html)
});
// https://stackoverflow.com/questions/4399005/implementing-jquerys-shake-effect-with-animate
function shake(div,interval,distance,times) {
Expand Down Expand Up @@ -125,7 +129,7 @@ $(document).ready(function() {
}
});
})();

// responsive tabs, scroll to opened tab
$(document).on("shown.bs.collapse shown.bs.tab", function (e) {
var target = $(e.target);
Expand Down Expand Up @@ -409,4 +413,4 @@ function copyToClipboard(id) {
// only works with https connections
navigator.clipboard.writeText(copyText.value);
mailcow_alert_box(lang.copy_to_clipboard, "success");
}
}