Ticket Patch

This commit is contained in:
SahrulGnwn 2022-08-10 20:18:51 +07:00
parent 915d5e9854
commit 51d3d94ddd
4 changed files with 30 additions and 8 deletions

View file

@ -88,11 +88,13 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
@if($tickets->hasPages())
<div class="card-footer">
{{ $tickets->links() }}
</div>
@endif
</div> </div>
</div> </div>
<!-- END CUSTOM CONTENT --> <!-- END CUSTOM CONTENT -->

View file

@ -24,7 +24,7 @@
<!-- MAIN CONTENT --> <!-- MAIN CONTENT -->
<section class="content"> <section class="content">
<div class="container-fluid"> <div class="container-fluid">
<form action="{{route('ticket.new.store')}}" method="POST"> <form action="{{route('ticket.new.store')}}" method="POST" class="ticket-form">
@csrf @csrf
<div class="row"> <div class="row">
<div class="col-lg-6"> <div class="col-lg-6">
@ -92,7 +92,7 @@
</div> </div>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary ticket-once">
{{__('Open Ticket')}} {{__('Open Ticket')}}
</button> </button>
</div> </div>
@ -123,5 +123,13 @@
</div> </div>
</section> </section>
<!-- END CONTENT --> <!-- END CONTENT -->
<script type="text/javascript">
$(".ticket-form").submit(function (e) {
$(".ticket-once").attr("disabled", true);
return true;
})
</script>
@endsection @endsection

View file

@ -72,8 +72,12 @@
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
@if($tickets->hasPages())
<div class="card-footer">
{{ $tickets->links() }}
</div>
@endif
</div> </div>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">

View file

@ -110,7 +110,7 @@
</div> </div>
@endforeach @endforeach
<div class="comment-form"> <div class="comment-form">
<form action="{{ route('ticket.reply')}}" method="POST" class="form"> <form action="{{ route('ticket.reply')}}" method="POST" class="form reply-form">
{!! csrf_field() !!} {!! csrf_field() !!}
<input type="hidden" name="ticket_id" value="{{ $ticket->id }}"> <input type="hidden" name="ticket_id" value="{{ $ticket->id }}">
<div class="form-group{{ $errors->has('ticketcomment') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('ticketcomment') ? ' has-error' : '' }}">
@ -122,7 +122,7 @@
@endif @endif
</div> </div>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary reply-once">Submit</button>
</div> </div>
</form> </form>
</div> </div>
@ -133,5 +133,13 @@
</div> </div>
</section> </section>
<!-- END CONTENT --> <!-- END CONTENT -->
<script type="text/javascript">
$(".reply-form").submit(function (e) {
$(".reply-once").attr("disabled", true);
return true;
})
</script>
@endsection @endsection