From ed2d5b466f5974a033bd78d3ed2c21cc6e4b9d1e Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Thu, 16 Aug 2018 10:36:35 +0530 Subject: [PATCH] Custom form issue and exapmle.env Fixed Github issues regarding rendering of custom form data in ticket detail page. Following issues have been raised regarding this issue #416 #462 #553 --- .../Agent/helpdesk/TicketController.php | 2 +- app/Http/Requests/helpdesk/ClientRequest.php | 1 - example.env | 18 ++++++++++++++++++ .../agent/helpdesk/ticket/timeline.blade.php | 4 ++-- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 example.env diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php index 02f9cbb8e..b3dd317ec 100644 --- a/app/Http/Controllers/Agent/helpdesk/TicketController.php +++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php @@ -126,7 +126,7 @@ class TicketController extends Controller $source = Ticket_source::where('name', '=', 'agent')->first(); $headers = null; $help = Help_topic::where('id', '=', $helptopic)->first(); - $form_data = null; + $form_data = $request->except('name', 'phone', 'email', 'subject', 'body', 'helptopic', '_wysihtml5_mode', '_token', 'mobile', 'code', 'priority', 'attachment', 'first_name', 'last_name', 'sla', 'duedate', 'assignto'); $auto_response = 0; $status = 1; if ($phone != null || $mobile_number != null) { diff --git a/app/Http/Requests/helpdesk/ClientRequest.php b/app/Http/Requests/helpdesk/ClientRequest.php index 9fbd5b12b..8dc900750 100644 --- a/app/Http/Requests/helpdesk/ClientRequest.php +++ b/app/Http/Requests/helpdesk/ClientRequest.php @@ -31,7 +31,6 @@ class ClientRequest extends Request { $check = $this->check(new CommonSettings()); if ($check != 0) { - return $check; $custom_rule = $this->getCustomRule(); $rules = array_merge($check, $custom_rule); diff --git a/example.env b/example.env new file mode 100644 index 000000000..d6b88a59d --- /dev/null +++ b/example.env @@ -0,0 +1,18 @@ +APP_ENV=production +APP_DEBUG=false +APP_KEY=SomeRandomString +DB_TYPE= +DB_HOST= +DB_PORT= +DB_DATABASE= +DB_USERNAME= +DB_PASSWORD= +DB_INSTALL=%0% +MAIL_DRIVER=smtp +MAIL_HOST=mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync \ No newline at end of file diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php index a9ed23bdf..5f316728c 100644 --- a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php +++ b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php @@ -752,10 +752,10 @@ if ($thread->title != "") { @endif - @if($conversation->id == $ij->id) - ticket_id)->select('id')->get(); ?> + id)->get(); + ?> @if(isset($ticket_form_datas))