diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 42b643acd7..271ae79784 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -133,7 +133,7 @@ if (is_ajax()) { } } - $style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc;' : ''; + $style = ((int) $field_hidden === 1) ? '-webkit-text-security: disc; font-family: text-security-disc;' : ''; if (!empty($field_value)) { $field_value = io_safe_output($field_value); diff --git a/pandora_console/godmode/alerts/configure_alert_command.php b/pandora_console/godmode/alerts/configure_alert_command.php index 1631f2f24e..27ee616f0b 100644 --- a/pandora_console/godmode/alerts/configure_alert_command.php +++ b/pandora_console/godmode/alerts/configure_alert_command.php @@ -369,7 +369,7 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) { $selected, !$is_management_allowed, 'cursor: \'pointer\'', - 'class="hide_inputs"', + ['input_class' => 'hide_inputs'], true ) ); @@ -413,16 +413,16 @@ $(document).ready (function () { $(".hide_inputs").each(function(index) { var $input_in_row = $(this).closest('tr').find('.field_value'); if($(this).is(':checked')) { - $input_in_row.prop('style', '-webkit-text-security: disc;'); + $input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;'); } else { $input_in_row.prop('style', ''); } }); - + $(".hide_inputs").click(function() { var $input_in_row = $(this).closest('tr').find('.field_value'); if($(this).is(':checked')) { - $input_in_row.prop('style', '-webkit-text-security: disc;'); + $input_in_row.prop('style', '-webkit-text-security: disc; font-family: text-security-disc;'); } else { $input_in_row.prop('style', ''); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index b4536bcf5f..834f09ca7a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4273,22 +4273,22 @@ function html_print_checkbox_extended( if (is_array($attributes) === true) { $tmpAttributes = []; - foreach ($attributes as $key => $value) { + foreach ($attributes as $key => $val) { switch ($key) { case 'input_class': - $inputClass .= ' '.$value; + $inputClass .= ' '.$val; break; case 'label_class': - $labelClass .= ' '.$value; + $labelClass .= ' '.$val; break; case 'label_style': - $labelStyle .= 'style="'.$value.'"'; + $labelStyle .= 'style="'.$val.'"'; break; default: - $tmpAttributes[] = $key.'="'.$value.'"'; + $tmpAttributes[] = $key.'="'.$val.'"'; break; } } diff --git a/pandora_console/include/javascript/pandora_alerts.js b/pandora_console/include/javascript/pandora_alerts.js index b527067290..7af8b5b1ec 100644 --- a/pandora_console/include/javascript/pandora_alerts.js +++ b/pandora_console/include/javascript/pandora_alerts.js @@ -21,7 +21,10 @@ function parse_alert_command(command, classs) { "[RECOVER]" + $($(".fields")[nfield - 1]).val() ); } - } else if ($(this).css("-webkit-text-security") == "disc") { + } else if ( + $(this).css("-webkit-text-security") == "disc" || + $(this).css("font-family") == "text-security-disc" + ) { var hidden_character = "*"; var hidden_string = hidden_character.repeat($(this).val().length); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index adf1325b07..bdd0d3f395 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -87,6 +87,11 @@ font-weight: 900; } +@font-face { + font-family: "text-security-disc"; + src: url("https://raw.githubusercontent.com/noppa/text-security/master/dist/text-security-disc.woff"); +} + /* @font-face { font-family: "lato-italic";