PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 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 All 69 releases
← All changes | app/Services/EmailNotification/Settings.php +103 -55 2.4.0 → 2.4.5 View file →
@@ -77,8 +77,15 @@
77 77 // 15-day default rather than trusting the submitted value as-is.
78 78 if (isset($settings['report_snapshot_retention']) && !in_array($settings['report_snapshot_retention'], ['3', '7', '15'], true)) {
79 79 $settings['report_snapshot_retention'] = '15';
80 80 }
81 + // These keys become user meta on signup, so keep only the offered fields.
82 + if (isset($settings['custom_registration_form_field'])) {
83 + $settings['custom_registration_form_field'] = array_values(array_intersect(
84 + (array) $settings['custom_registration_form_field'],
85 + array_keys(Helper::getCustomRegistrationFieldOptions())
86 + ));
87 + }
81 88 }
82 89
83 90 if ($settingsKey == 'global_business_settings' && !empty($settings['agent_time_tracking'])) {
84 91 if (class_exists(TimeTrackMigrator::class) && $settings['agent_time_tracking'] === 'yes') {
@@ -191,16 +198,9 @@
191 198 foreach ($mimeGroups as $mimeGroup => $mime) {
192 199 $formattedMimeGroups[$mimeGroup] = $mime['title'];
193 200 }
194 201
195 - $customRegistrationFormOptions = array(
196 - 'address_line_1' => 'Address Line 1',
197 - 'address_line_2' => 'Address Line 2',
198 - 'city' => 'City',
199 - 'zip' => 'Zip Code',
200 - 'state' => 'State',
201 - 'country' => 'Country',
202 - );
202 + $customRegistrationFormOptions = Helper::getCustomRegistrationFieldOptions();
203 203
204 204 $fields = [
205 205 'ticket_link_portal_description' => [
206 206 'type' => 'html-viewer',
@@ -240,9 +240,9 @@
240 240 ],
241 241 'login_message' => [
242 242 'type' => 'wp-editor',
243 243 'label' => __('Message for non logged in users', 'fluent-support'),
244 - 'inline_help' => __('Please provide message for not logged in users. You can place login shortcode too. Use shortcode <code>[fluent_support_login]</code> to show built-in login form. For the user registration use this shortcode <code>[fluent_support_signup]</code> and for both form please use <code>[fluent_support_auth]</code>', 'fluent-support')
244 + 'inline_help' => __('Please provide message for not logged in users. You can place login shortcode too. Use shortcode <code>[fluent_support_login]</code> to show built-in login form. For the user registration use this shortcode <code>[fluent_support_signup]</code> and for both form please use <code>[fluent_support_auth]</code>. Registration forms only show when "Anyone can register" is enabled in Settings > General.', 'fluent-support')
245 245 ],
246 246 'disable_public_ticket' => [
247 247 'wrapper_class' => '',
248 248 'type' => 'inline-checkbox',
@@ -409,11 +409,49 @@
409 409 ];
410 410
411 411 }
412 412
413 + if (Helper::getAuthProvider() === 'fluent_auth') {
414 + $fields = $this->replaceTwoFaWithFluentAuthNotice($fields);
415 + }
416 +
413 417 return $fields;
414 418 }
415 419
420 + /**
421 + * With FluentAuth handling portal sign-in, our 2FA toggle no longer applies, so a note
422 + * pointing to FluentAuth's 2FA settings takes its place. The stored value is kept.
423 + *
424 + * @param array $fields
425 + * @return array
426 + */
427 + private function replaceTwoFaWithFluentAuthNotice($fields)
428 + {
429 + $notice = [
430 + 'type' => 'html-viewer',
431 + 'label' => __('Two-Factor Authentication', 'fluent-support'),
432 + 'wrapper_class' => 'fs_warn_alert_wrapper',
433 + 'html' => sprintf(
434 + /* translators: %s: URL of the FluentAuth settings page */
435 + __('Portal sign-in is handled by the FluentAuth plugin, so two-factor authentication for your customers and agents is set up there. FluentAuth applies it to the roles you choose, so include your customers\' role. <a href="%s">Open FluentAuth settings</a>', 'fluent-support'),
436 + esc_url(admin_url('admin.php?page=fluent-auth#/settings'))
437 + ),
438 + ];
439 +
440 + $replaced = [];
441 +
442 + foreach ($fields as $key => $field) {
443 + if ($key === 'enable_two_fa') {
444 + $replaced['fluent_auth_two_fa_notice'] = $notice;
445 + continue;
446 + }
447 +
448 + $replaced[$key] = $field;
449 + }
450 +
451 + return $replaced;
452 + }
453 +
416 454 private function getTicketLinkPortalOptions()
417 455 {
418 456 $options = [
419 457 [
@@ -473,41 +511,49 @@
473 511 {
474 512 $actionLabel = __('Action', 'fluent-support');
475 513 $shortcutLabel = __('Shortcut', 'fluent-support');
476 514
515 + // Windows and Linux use Ctrl where macOS uses ⌘ (see resources/admin/Bits/shortcuts.js).
477 516 $macShortcuts = [
478 - ['action' => __('Tickets – Advanced filter toggle', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + f'],
479 - ['action' => __('Tickets – Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
480 - ['action' => __('Tickets – Create Ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
481 - ['action' => __('Tickets – Reset filter', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
482 - ['action' => __('Tickets – All Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + a'],
483 - ['action' => __('Tickets – My Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + m'],
484 - ['action' => __('Tickets – Unassigned', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + u'],
485 - ['action' => __('Tickets – Waiting for reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + w'],
486 - ['action' => __('Tickets – Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + b'],
487 - ['action' => __('Tickets – Toggle (Open, active, close, all)', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + → / ←'],
488 - ['action' => __('Ticket Reply – Reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
489 - ['action' => __('Ticket Reply – Personal note', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
490 - ['action' => __('Ticket Reply – Merge', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + m'],
491 - ['action' => __('Ticket Reply – Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + b'],
492 - ['action' => __('Ticket Reply – Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
517 + ['action' => __('Tickets: Advanced filter toggle', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + f'],
518 + ['action' => __('Tickets: Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
519 + ['action' => __('Tickets: Create Ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
520 + ['action' => __('Tickets: Reset filter', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
521 + ['action' => __('Tickets: All Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + a'],
522 + ['action' => __('Tickets: My Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + m'],
523 + ['action' => __('Tickets: Unassigned', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + u'],
524 + ['action' => __('Tickets: Waiting for reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + w'],
525 + ['action' => __('Tickets: Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + b'],
526 + ['action' => __('Tickets: Toggle (Open, active, close, all)', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + → / ←'],
527 + ['action' => __('Ticket Reply: Reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
528 + ['action' => __('Ticket Reply: Personal note', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
529 + ['action' => __('Ticket Reply: Merge', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + m'],
530 + ['action' => __('Ticket Reply: Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + b'],
531 + ['action' => __('Ticket Reply: Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
532 + ['action' => __('Ticket Reply: Next ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + ↓'],
533 + ['action' => __('Ticket Reply: Previous ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + ↑'],
534 + ['action' => __('Ticket Reply: Close ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + x'],
493 535 ];
494 536
495 537 $winShortcuts = [
496 - ['action' => __('Tickets – Advanced filter toggle', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + f'],
497 - ['action' => __('Tickets – Refresh', 'fluent-support'), 'shortcut' => 'Alt + Win + q'],
498 - ['action' => __('Tickets – Create Ticket', 'fluent-support'), 'shortcut' => 'Alt + Win + n'],
499 - ['action' => __('Tickets – Reset filter', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + r'],
500 - ['action' => __('Tickets – All Tickets', 'fluent-support'), 'shortcut' => 'Win + Shift + a'],
501 - ['action' => __('Tickets – My Tickets', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + m'],
502 - ['action' => __('Tickets – Unassigned', 'fluent-support'), 'shortcut' => 'Win + Shift + u'],
503 - ['action' => __('Tickets – Waiting for reply', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + w'],
504 - ['action' => __('Tickets – Bookmarks', 'fluent-support'), 'shortcut' => 'Win + Shift + b'],
505 - ['action' => __('Ticket Reply – Reply', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + r'],
506 - ['action' => __('Ticket Reply – Personal note', 'fluent-support'), 'shortcut' => 'Alt + Win + n'],
507 - ['action' => __('Ticket Reply – Merge', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + Win + m'],
508 - ['action' => __('Ticket Reply – Bookmarks', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + Win + b'],
509 - ['action' => __('Ticket Reply – Refresh', 'fluent-support'), 'shortcut' => 'Alt + Win + q'],
538 + ['action' => __('Tickets: Advanced filter toggle', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + f'],
539 + ['action' => __('Tickets: Refresh', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + q'],
540 + ['action' => __('Tickets: Create Ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + n'],
541 + ['action' => __('Tickets: Reset filter', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + r'],
542 + ['action' => __('Tickets: All Tickets', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + a'],
543 + ['action' => __('Tickets: My Tickets', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + m'],
544 + ['action' => __('Tickets: Unassigned', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + u'],
545 + ['action' => __('Tickets: Waiting for reply', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + w'],
546 + ['action' => __('Tickets: Bookmarks', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + b'],
547 + ['action' => __('Tickets: Toggle (Open, active, close, all)', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + → / ←'],
548 + ['action' => __('Ticket Reply: Reply', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + r'],
549 + ['action' => __('Ticket Reply: Personal note', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + n'],
550 + ['action' => __('Ticket Reply: Merge', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + m'],
551 + ['action' => __('Ticket Reply: Bookmarks', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + b'],
552 + ['action' => __('Ticket Reply: Refresh', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + q'],
553 + ['action' => __('Ticket Reply: Next ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + ↓'],
554 + ['action' => __('Ticket Reply: Previous ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + ↑'],
555 + ['action' => __('Ticket Reply: Close ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + x'],
510 556 ];
511 557
512 558 return [
513 559 'title' => __('Keyboard Shortcuts', 'fluent-support'),
@@ -548,9 +594,9 @@
548 594 'ticket_created_email_to_customer' => [
549 595 'key' => 'ticket_created_email_to_customer',
550 596 'title' => __('Ticket Created (To Customer)', 'fluent-support'),
551 597 'description' => __('This email will be sent when a customer submit a support ticket', 'fluent-support'),
552 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
598 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
553 599 'default_status' => 'no',
554 600 'send_attachments'=> 'no'
555 601 ],
556 602 'ticket_replied_by_agent_email_to_customer' => [
@@ -556,9 +602,9 @@
556 602 'ticket_replied_by_agent_email_to_customer' => [
557 603 'key' => 'ticket_replied_by_agent_email_to_customer',
558 604 'title' => __('Replied by Agent (To Customer)', 'fluent-support'),
559 605 'description' => __('This email will be sent when an agent reply to a ticket', 'fluent-support'),
560 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
606 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
561 607 'default_status' => 'yes',
562 608 'send_attachments'=> 'no'
563 609 ],
564 610 'ticket_closed_by_agent_email_to_customer' => [
@@ -564,9 +610,9 @@
564 610 'ticket_closed_by_agent_email_to_customer' => [
565 611 'key' => 'ticket_closed_by_agent_email_to_customer',
566 612 'title' => __('Ticket Closed by Agent (To Customer)', 'fluent-support'),
567 613 'description' => __('This email will be sent when an agent close a ticket', 'fluent-support'),
568 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
614 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
569 615 'default_status' => 'no',
570 616 'send_attachments'=> 'no'
571 617 ],
572 618 'ticket_created_email_to_admin' => [
@@ -572,9 +618,9 @@
572 618 'ticket_created_email_to_admin' => [
573 619 'key' => 'ticket_created_email_to_admin',
574 620 'title' => __('Ticket Created (To Admin)', 'fluent-support'),
575 621 'description' => __('This email will be sent when the business when a new ticket has been submitted', 'fluent-support'),
576 - 'email_subject' => 'New Ticket: {{ticket.title}} #{{ticket.id}}',
622 + 'email_subject' => 'New Ticket: {{ticket.title}} #{{ticket.public_id}}',
577 623 'default_status' => 'yes',
578 624 'send_attachments'=> 'no'
579 625 ],
580 626 'ticket_replied_by_customer_email_to_admin' => [
@@ -580,9 +626,9 @@
580 626 'ticket_replied_by_customer_email_to_admin' => [
581 627 'key' => 'ticket_replied_by_customer_email_to_admin',
582 628 'title' => __('Replied by Customer (To Agent/Admin)', 'fluent-support'),
583 629 'description' => __('This email will be sent to Assigned Agent or Admin when a customer reply to a ticket', 'fluent-support'),
584 - 'email_subject' => 'New Response: {{ticket.title}} #{{ticket.id}}',
630 + 'email_subject' => 'New Response: {{ticket.title}} #{{ticket.public_id}}',
585 631 'default_status' => 'yes',
586 632 'send_attachments'=> 'no'
587 633 ],
588 634 'ticket_agent_on_change' => [
@@ -588,9 +634,9 @@
588 634 'ticket_agent_on_change' => [
589 635 'key' => 'ticket_agent_on_change',
590 636 'title' => __('Ticket Agent Change (To Agent)', 'fluent-support'),
591 637 'description' => __('This email will be sent to newly assigned agent', 'fluent-support'),
592 - 'email_subject' => 'Ticket Agent Change: {{ticket.title}} #{{ticket.id}}',
638 + 'email_subject' => 'Ticket Agent Change: {{ticket.title}} #{{ticket.public_id}}',
593 639 'default_status' => 'yes',
594 640 'send_attachments'=> 'no'
595 641 ],
596 642 'ticket_created_by_agent_email_to_customer' => [
@@ -596,9 +642,9 @@
596 642 'ticket_created_by_agent_email_to_customer' => [
597 643 'key' => 'ticket_created_by_agent_email_to_customer',
598 644 'title' => __('Ticket Logged by Agent (To Customer)', 'fluent-support'),
599 645 'description' => __('This email will be sent when an agent logs a ticket on behalf of a customer (e.g. from a phone call or email received outside the system)', 'fluent-support'),
600 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
646 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
601 647 'default_status' => 'no',
602 648 'send_attachments'=> 'no'
603 649 ],
604 650 'ticket_created_by_agent_on_behalf_email_to_customer' => [
@@ -604,9 +650,10 @@
604 650 'ticket_created_by_agent_on_behalf_email_to_customer' => [
605 651 'key' => 'ticket_created_by_agent_on_behalf_email_to_customer',
606 652 'title' => __('Agent Outreach Ticket (To Customer)', 'fluent-support'),
607 653 'description' => __('This email will be sent when an agent creates a ticket using the "Agent Initiated" option to proactively reach out to a customer — includes the agent\'s message content', 'fluent-support'),
608 - 'email_subject' => 'Your ticket has been created (#{{ticket.id}})',
654 + // Outreach reads like an email the agent wrote: their subject, their message.
655 + 'email_subject' => '{{ticket.title}}',
609 656 'default_status' => 'yes',
610 657 'send_attachments'=> 'no'
611 658 ]
612 659 ];
@@ -674,38 +721,39 @@
674 721 private function getDefaultEmailBody($emailKey, $type = 'web')
675 722 {
676 723 if ($emailKey == 'ticket_created_email_to_customer') {
677 724 if ($type == 'web') {
678 - return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>Your request (<a href="{{ticket.public_url}}">#{{ticket.id}}</a>) has been received, and is being reviewed by our support staff.</p><p>To add additional comments, follow the link below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>&nbsp;</p><p>or follow this link: {{ticket.public_url}}</p><hr /><p>{{business.name}}</p>';
725 + return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>Your request (<a href="{{ticket.public_url}}">#{{ticket.public_id}}</a>) has been received, and is being reviewed by our support staff.</p><p>To add additional comments, follow the link below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>&nbsp;</p><p>or follow this link: {{ticket.public_url}}</p><hr /><p>{{business.name}}</p>';
679 726 } else {
680 727 return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>Your request has been received, and is being reviewed by our support staff.</p><p>Our support staff will reply back to you soon</p>';
681 728 }
682 729 } else if ($emailKey == 'ticket_replied_by_agent_email_to_customer') {
683 730 if ($type == 'web') {
684 - return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>An agent just replied to your ticket "<strong>{{ticket.title}}</strong>" (<a href="{{ticket.public_url}}">#{{ticket.id}}</a>). To view his reply or add additional comments, click the button below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>or follow this link: {{ticket.public_url}}</p><hr /><p>Regards,<br />{{business.name}}</p>';
731 + return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>An agent just replied to your ticket "<strong>{{ticket.title}}</strong>" (<a href="{{ticket.public_url}}">#{{ticket.public_id}}</a>). To view the reply or add additional comments, click the button below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>or follow this link: {{ticket.public_url}}</p><hr /><p>Regards,<br />{{business.name}}</p>';
685 732 } else {
686 - return '{{response.full_content}}<p>Regards,<br />{{agent.full_name}}</p>';
733 + // {{agent.signature}} is empty when the agent has none.
734 + return '{{response.full_content}}{{agent.signature}}';
687 735 }
688 736 } else if ($emailKey == 'ticket_closed_by_agent_email_to_customer') {
689 737 if ($type == 'web') {
690 - return '<p>Hi <strong><em>{{customer.full_name}},</strong></p><p>Your ticket - {{ticket.title}}</p><p>We hope that the ticket was resolved to your satisfaction. If you feel that the ticket should not be closed or if the ticket has not been resolved, please reopen the ticket (<a href="{{ticket.public_url}}">#{{ticket.id}}</a>)</p><p>Regards,<br />{{business.name}}</p>';
738 + return '<p>Hi <strong><em>{{customer.full_name}},</strong></p><p>Your ticket - {{ticket.title}}</p><p>We hope that the ticket was resolved to your satisfaction. If you feel that the ticket should not be closed or if the ticket has not been resolved, please reopen the ticket (<a href="{{ticket.public_url}}">#{{ticket.public_id}}</a>)</p><p>Regards,<br />{{business.name}}</p>';
691 739 } else {
692 740 return '<p>Hi <strong><em>{{customer.full_name}},</strong></p><p>Your ticket - {{ticket.title}}</p><p>We hope that the ticket was resolved to your satisfaction. If you feel that the ticket should not be closed or if the ticket has not been resolved, please feel free to reply back.<p>Regards,<br />{{business.name}}</p>';
693 741 }
694 742 } else if ($emailKey == 'ticket_created_email_to_admin') {
695 - return '<p>A new ticket (<a href="{{ticket.admin_url}}">{{ticket.title}}</a>) as been submitted by {{customer.full_name}}</p><h4>Ticket Body</h4><p>{{ticket.content}}</p><p><b><a href="{{ticket.admin_url}}">View Ticket</a></b></p>';
743 + return '<p>A new ticket (<a href="{{ticket.admin_url}}">{{ticket.title}}</a>) has been submitted by {{customer.full_name}}</p><h4>Ticket Body</h4><p>{{ticket.content}}</p><p><b><a href="{{ticket.admin_url}}">View Ticket</a></b></p>';
696 744 } else if ($emailKey == 'ticket_replied_by_customer_email_to_admin') {
697 745 return '<p>A new response has been added to "<a href="{{ticket.admin_url}}">{{ticket.title}}</a>" by {{customer.full_name}}</p><h4>Response Body</h4><p>{{response.content}}</p><p><b><a href="{{ticket.admin_url}}">View Ticket</a></b></p>';
698 746 } else if($emailKey == 'ticket_agent_on_change') {
699 - return '<p>Hi <strong><em>{{agent.full_name}}</em>,</strong></p><p>Ticket "<a href="{{ticket.admin_url}}">#{{ticket.id}}</a>" assigned to you.</p>';
747 + return '<p>Hi <strong><em>{{agent.full_name}}</em>,</strong></p><p>Ticket "<a href="{{ticket.admin_url}}">#{{ticket.public_id}}</a>" assigned to you.</p>';
700 748 } else if($emailKey == 'ticket_created_by_agent_email_to_customer') {
701 749 return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>{{agent.full_name}} created a ticket on behalf of you, you can check it <a href="{{ticket.public_url}}">here</a></p>.';
702 750 } else if($emailKey == 'ticket_created_by_agent_on_behalf_email_to_customer') {
703 751 if ($type == 'web') {
704 - return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>A support agent has created a new ticket on your behalf titled "{{ticket.title}}" (#{{ticket.id}}).</p><p>You can review the details, track progress, or add additional comments by clicking the button below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>Or follow this link: {{ticket.public_url}}</p><p>Best regards,<br />{{agent.full_name}}</p>';
705 - } else {
706 - return '{{response.full_content}}<p>Regards,<br />{{agent.full_name}}</p>';
752 + // Web mailboxes take replies in the portal, not by email.
753 + return '{{response.full_content}}{{agent.signature}}<p><a href="{{ticket.public_url}}">Reply to this conversation</a></p>';
707 754 }
755 + return '{{response.full_content}}{{agent.signature}}';
708 756 }
709 757
710 758 return '';
711 759 }