PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.3.0
Fluent Support – Helpdesk & Customer Support Ticket System v2.3.0
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
fluent-support / app / Services / Blocks / BlockHelper.php

BlockHelper.php in Fluent Support – Helpdesk & Customer Support Ticket System 2.3.0, at app/Services/Blocks/BlockHelper.php

70 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentSupport\App\Services\Blocks;
4
5 class BlockHelper
6 {
7 // Store the attributes provided for styling
8 private static $attributes = [];
9
10 /**
11 * Generate and output inline CSS styles based on the provided attributes.
12 *
13 * This method processes the provided attributes and dynamically generates CSS styles for various components
14 * of customer portal pages, such as the Tickets List, View Ticket, and Create Ticket sections.
15 *
16 * @param array $attributes An associative array of attributes used for styling.
17 */
18
19 public static function processAttributesAndPrepareStyle($attributes)
20 {
21 self::$attributes = $attributes;
22 ?>
23 <style type="text/css">
24 #fluent_support_client_app {
25 .fs_tickets_container,
26 .fs_ticket_form_container {
27 border-radius: <?php echo esc_attr($attributes['containerBorderRadius'] ?? 16); ?>px;
28 }
29
30 .fs_create_ticket_btn,
31 .fs_create_ticket_button,
32 .fs_reply_btn {
33 background-color: <?php echo esc_attr($attributes['primaryButtonBgColor'] ?? 'rgba(14, 18, 27, 1)'); ?>;
34 color: <?php echo esc_attr($attributes['primaryButtonTextColor'] ?? 'rgba(255, 255, 255, 1)'); ?>;
35 }
36
37 .fs_ticket_refresh_btn,
38 .fs_upload_button {
39 background-color: <?php echo esc_attr($attributes['secondaryButtonBgColor'] ?? 'rgba(255, 255, 255, 1)'); ?>;
40 color: <?php echo esc_attr($attributes['secondaryButtonTextColor'] ?? '#18181B'); ?>;
41 }
42
43 .fs_ticket_refresh_btn span,
44 .fs_upload_button span {
45 color: inherit !important;
46 }
47
48 .fs_close_ticket {
49 background-color: <?php echo esc_attr($attributes['secondaryButtonBgColor'] ?? '#F5F7FA'); ?>;
50 color: <?php echo esc_attr($attributes['secondaryButtonTextColor'] ?? '#525866'); ?>;
51 opacity: 0.8;
52 filter: brightness(0.8);
53 }
54
55 .fs_client_portal
56 .fs_create_ticket_container .el-input__wrapper,
57 .fs_create_ticket_container .el-select__wrapper,
58 .fs_custom_fields_wrap .el-select__wrapper {
59 border-radius: <?php echo esc_attr($attributes['ticketInputBorderRadius'] ?? 10); ?>px;
60 }
61
62 .fs_client_portal .fs_ticket_threads_container .fs_ticket_thread .fs_ticket_thread_content .fs_ticket_avatar {
63 border-radius: <?php echo esc_attr($attributes['avatarBorderRadius'] ?? '50%'); ?>;
64 }
65 }
66
67 </style>
68 <?php }
69 }
70