From 42c96239c8df9365f4d1cba6e4a96acb6c10d08e Mon Sep 17 00:00:00 2001 From: fusionate Date: Tue, 18 Mar 2025 17:55:41 -0600 Subject: [PATCH] Theme: Set select password fields to monospace font when revealed. New input_text_font_password setting to control default font. --- app/call_centers/call_center_agent_edit.php | 2 +- app/devices/device_edit.php | 2 +- app/extensions/extension_edit.php | 2 +- app/fax/fax_advanced.php | 2 +- app/gateways/gateway_edit.php | 2 +- core/default_settings/default_setting_edit.php | 2 +- core/domain_settings/domain_setting_edit.php | 2 +- core/user_settings/user_setting_edit.php | 2 +- themes/default/app_config.php | 8 ++++++++ themes/default/css.php | 7 +++++++ 10 files changed, 23 insertions(+), 8 deletions(-) diff --git a/app/call_centers/call_center_agent_edit.php b/app/call_centers/call_center_agent_edit.php index 190d8988e9..8ffdf43f43 100644 --- a/app/call_centers/call_center_agent_edit.php +++ b/app/call_centers/call_center_agent_edit.php @@ -401,7 +401,7 @@ echo " ".$text['label-agent_password']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-agent_password']."\n"; echo "\n"; diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index f5567759fe..d42160d68f 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -1405,7 +1405,7 @@ if (permission_exists('device_line_password')) { echo " \n"; echo " "; //help defeat browser auto-fill - echo " \n"; + echo " \n"; echo " \n"; } diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index f99c45b1b6..93c73ac8df 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -1235,7 +1235,7 @@ echo "\n"; echo "\n"; echo " \n"; //help defeat browser auto-fill - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-password']."\n"; echo "\n"; diff --git a/app/fax/fax_advanced.php b/app/fax/fax_advanced.php index 73af5df487..b193859a41 100644 --- a/app/fax/fax_advanced.php +++ b/app/fax/fax_advanced.php @@ -314,7 +314,7 @@ echo " \n"; echo " \n"; echo " \n"; //help defeat browser auto-fill - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-email_connection_password']."\n"; echo " \n"; diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index dcb82c34f1..d7cf27ea6c 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -423,7 +423,7 @@ echo "\n"; echo "\n"; echo " \n"; //help defeat browser auto-fill - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-password']."\n"; echo "\n"; diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 0a7f540f1a..cb0c89a500 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -519,7 +519,7 @@ echo " \n"; } elseif ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || $category == "login" && $subcategory == "password_reset_key" && $name == "text") { - echo " \n"; + echo " \n"; } elseif (substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) { echo " \n"; diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index e9294fd58a..714135b565 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -566,7 +566,7 @@ echo " \n"; } elseif ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || $category == "login" && $subcategory == "password_reset_key" && $name == "text") { - echo " \n"; + echo " \n"; } elseif ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) { echo " \n"; diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php index 3e0ec3fc2f..51ab3ca2a0 100644 --- a/core/user_settings/user_setting_edit.php +++ b/core/user_settings/user_setting_edit.php @@ -545,7 +545,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { echo " \n"; } else if ($user_setting_subcategory == 'password' || substr_count($user_setting_subcategory, '_password') > 0 || $user_setting_category == "login" && $user_setting_subcategory == "password_reset_key" && $user_setting_name == "text") { - echo " \n"; + echo " \n"; } else if ($user_setting_category == "theme" && substr_count($user_setting_subcategory, "_color") > 0 && ($user_setting_name == "text" || $user_setting_name == 'array')) { echo " \n"; diff --git a/themes/default/app_config.php b/themes/default/app_config.php index 0b7d35af68..29b8c6250a 100644 --- a/themes/default/app_config.php +++ b/themes/default/app_config.php @@ -2024,6 +2024,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the font of text input content."; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "dbfa8a1a-51e5-4274-949c-e84f29e831f1"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_text_font_password"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "monospace"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the font of password text input content."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "848fd70e-bbba-4f43-ac5d-897229bb19c8"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_text_color"; diff --git a/themes/default/css.php b/themes/default/css.php index 7ef75befc6..031129cc97 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -119,6 +119,7 @@ $heading_text_size = $settings->get('theme', 'heading_text_size', '15px'); $heading_text_font = $settings->get('theme', 'heading_text_font', 'arial'); $input_height = $settings->get('theme', 'input_height', '28px'); $input_text_font = $settings->get('theme', 'input_text_font', 'Arial'); +$input_text_font_password = $settings->get('theme', 'input_text_font_password', 'monospace'); $input_text_size = $settings->get('theme', 'input_text_size', '12px'); $input_text_color = $settings->get('theme', 'input_text_color', '#000'); $input_text_placeholder_color = $settings->get('theme', 'input_text_placeholder_color', '#999999; opacity: 1.0;'); @@ -1885,6 +1886,12 @@ else { //default: white -webkit-transition: all 0.25s ease; } + input[type=text].txt.password, + input[type=text].formfld.password { + font-family: !important; + max-width: 164px; + } + select.txt, select.formfld { padding: 4px 2px;