Fix incorrect Lang:get using, undeclared variable, missing csrf token
This commit is contained in:
@@ -270,12 +270,13 @@ class FormController extends Controller
|
|||||||
public function post_ticket_reply($id, Request $request)
|
public function post_ticket_reply($id, Request $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($comment != null) {
|
$comment = $request->input('comment');
|
||||||
|
if (!empty($comment)) {
|
||||||
$tickets = Tickets::where('id', '=', $id)->first();
|
$tickets = Tickets::where('id', '=', $id)->first();
|
||||||
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
$thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||||
|
|
||||||
$subject = $thread->title.'[#'.$tickets->ticket_number.']';
|
$subject = $thread->title.'[#'.$tickets->ticket_number.']';
|
||||||
$body = $request->input('comment');
|
$body = $comment;
|
||||||
|
|
||||||
$user_cred = User::where('id', '=', $tickets->user_id)->first();
|
$user_cred = User::where('id', '=', $tickets->user_id)->first();
|
||||||
|
|
||||||
|
2
app/Http/Controllers/Client/helpdesk/UnAuthController.php
Normal file → Executable file
2
app/Http/Controllers/Client/helpdesk/UnAuthController.php
Normal file → Executable file
@@ -172,7 +172,7 @@ class UnAuthController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function rating($id, Request $request, \App\Model\helpdesk\Ratings\RatingRef $rating_ref)
|
public function rating($id, Request $request, \App\Model\helpdesk\Ratings\RatingRef $rating_ref)
|
||||||
{
|
{
|
||||||
foreach ($request->all() as $key => $value) {
|
foreach ($request->except(['_token']) as $key => $value) {
|
||||||
if (strpos($key, '_') !== false) {
|
if (strpos($key, '_') !== false) {
|
||||||
$ratName = str_replace('_', ' ', $key);
|
$ratName = str_replace('_', ' ', $key);
|
||||||
} else {
|
} else {
|
||||||
|
18
resources/views/themes/default1/agent/helpdesk/ticket/answered.blade.php
Normal file → Executable file
18
resources/views/themes/default1/agent/helpdesk/ticket/answered.blade.php
Normal file → Executable file
@@ -119,12 +119,12 @@ if (Auth::user()->role == 'agent') {
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="merge-succ-alert" class="alert alert-success alert-dismissable" style="display:none;" >
|
<div id="merge-succ-alert" class="alert alert-success alert-dismissable" style="display:none;" >
|
||||||
<!--<button id="dismiss-merge" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
<!--<button id="dismiss-merge" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||||
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lag.alert') !!}!</h4>
|
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lang.alert') !!}!</h4>
|
||||||
<div id="message-merge-succ"></div>
|
<div id="message-merge-succ"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="merge-err-alert" class="alert alert-danger alert-dismissable" style="display:none;">
|
<div id="merge-err-alert" class="alert alert-danger alert-dismissable" style="display:none;">
|
||||||
<!--<button id="dismiss-merge2" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
<!--<button id="dismiss-merge2" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||||
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lag.alert') !!}!</h4>
|
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lang.alert') !!}!</h4>
|
||||||
<div id="message-merge-err"></div>
|
<div id="message-merge-err"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,6 +147,7 @@ if (Auth::user()->role == 'agent') {
|
|||||||
<label>{!! Lang::get('lang.merge-reason') !!}</label>
|
<label>{!! Lang::get('lang.merge-reason') !!}</label>
|
||||||
<textarea name="reason" class="form-control"></textarea>
|
<textarea name="reason" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div><!-- mereg-body-form -->
|
</div><!-- mereg-body-form -->
|
||||||
</div><!-- merge-body -->
|
</div><!-- merge-body -->
|
||||||
@@ -216,6 +217,7 @@ if (Auth::user()->role == 'agent') {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var t_id = [];
|
var t_id = [];
|
||||||
var option = null;
|
var option = null;
|
||||||
@@ -238,6 +240,7 @@ if (Auth::user()->role == 'agent') {
|
|||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
// Enable check and uncheck all functionality
|
// Enable check and uncheck all functionality
|
||||||
|
|
||||||
$(".checkbox-toggle").click(function() {
|
$(".checkbox-toggle").click(function() {
|
||||||
var clicks = $(this).data('clicks');
|
var clicks = $(this).data('clicks');
|
||||||
if (clicks) {
|
if (clicks) {
|
||||||
@@ -253,13 +256,17 @@ if (Auth::user()->role == 'agent') {
|
|||||||
//Check all checkboxes
|
//Check all checkboxes
|
||||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||||
// alert('Hallo');
|
// alert('Hallo');
|
||||||
showAssign(t_id);
|
|
||||||
t_id = [];
|
t_id = [];
|
||||||
|
showAssign(t_id)
|
||||||
}
|
}
|
||||||
$(this).data("clicks", !clicks);
|
$(this).data("clicks", !clicks);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function() { /// Wait till page is loaded
|
$(document).ready(function() { /// Wait till page is loaded
|
||||||
$('#click').click(function() {
|
$('#click').click(function() {
|
||||||
$('#refresh').load('inbox #refresh');
|
$('#refresh').load('inbox #refresh');
|
||||||
@@ -267,15 +274,19 @@ if (Auth::user()->role == 'agent') {
|
|||||||
$('#count_refresh').load('inbox #count_refresh');
|
$('#count_refresh').load('inbox #count_refresh');
|
||||||
$("#show").show();
|
$("#show").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".select2").select2();
|
$(".select2").select2();
|
||||||
|
|
||||||
$('#delete').on('click', function() {
|
$('#delete').on('click', function() {
|
||||||
option = 0;
|
option = 0;
|
||||||
$('#myModalLabel').html("{{Lang::get('lang.delete-tickets')}}");
|
$('#myModalLabel').html("{{Lang::get('lang.delete-tickets')}}");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#close').on('click', function() {
|
$('#close').on('click', function() {
|
||||||
option = 1;
|
option = 1;
|
||||||
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
|
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#modalpopup").on('submit', function(e) {
|
$("#modalpopup").on('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var msg = "{{Lang::get('lang.confirm')}}";
|
var msg = "{{Lang::get('lang.confirm')}}";
|
||||||
@@ -293,6 +304,7 @@ if (Auth::user()->role == 'agent') {
|
|||||||
$(".closemodal, .no").click(function() {
|
$(".closemodal, .no").click(function() {
|
||||||
$("#myModal").css("display", "none");
|
$("#myModal").css("display", "none");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.yes').click(function() {
|
$('.yes').click(function() {
|
||||||
var values = getValues();
|
var values = getValues();
|
||||||
if (values == "") {
|
if (values == "") {
|
||||||
|
2
resources/views/themes/default1/agent/helpdesk/ticket/assigned.blade.php
Normal file → Executable file
2
resources/views/themes/default1/agent/helpdesk/ticket/assigned.blade.php
Normal file → Executable file
@@ -245,7 +245,7 @@ if (Auth::user()->role == 'agent') {
|
|||||||
t_id = $('.selectval').map(function() {
|
t_id = $('.selectval').map(function() {
|
||||||
return $(this).val();
|
return $(this).val();
|
||||||
}).get();
|
}).get();
|
||||||
showAssign(t_id)
|
showAssign(t_id);
|
||||||
// alert(checkboxValues);
|
// alert(checkboxValues);
|
||||||
} else {
|
} else {
|
||||||
//Check all checkboxes
|
//Check all checkboxes
|
||||||
|
1
resources/views/themes/default1/client/helpdesk/unauth/showticket.blade.php
Normal file → Executable file
1
resources/views/themes/default1/client/helpdesk/unauth/showticket.blade.php
Normal file → Executable file
@@ -49,6 +49,7 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tick
|
|||||||
<table><tbody>
|
<table><tbody>
|
||||||
<?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?>
|
<?php $ratings = App\Model\helpdesk\Ratings\Rating::orderby('display_order')->get(); ?>
|
||||||
<form id="foo">
|
<form id="foo">
|
||||||
|
{!! csrf_field() !!}
|
||||||
@foreach($ratings as $rating)
|
@foreach($ratings as $rating)
|
||||||
|
|
||||||
@if($rating->rating_area == 'Helpdesk Area')
|
@if($rating->rating_area == 'Helpdesk Area')
|
||||||
|
Reference in New Issue
Block a user