create.blade.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. @extends('layouts.main')
  2. @section('content')
  3. <!-- CONTENT HEADER -->
  4. <section class="content-header">
  5. <div class="container-fluid">
  6. <div class="row mb-2">
  7. <div class="col-sm-6">
  8. <h1>{{ __('Ticket') }}</h1>
  9. </div>
  10. <div class="col-sm-6">
  11. <ol class="breadcrumb float-sm-right">
  12. <li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
  13. <li class="breadcrumb-item"><a class="text-muted"
  14. href="{{ route('ticket.index') }}">{{ __('Ticket') }}</a>
  15. </li>
  16. </ol>
  17. </div>
  18. </div>
  19. </div>
  20. </section>
  21. <!-- END CONTENT HEADER -->
  22. <!-- MAIN CONTENT -->
  23. <section class="content">
  24. <div class="container-fluid">
  25. <form action="{{route('ticket.new.store')}}" method="POST">
  26. @csrf
  27. <div class="row">
  28. <div class="col-lg-6">
  29. <div class="card">
  30. <div class="card-header">
  31. <h5 class="card-title">
  32. <i class="fas fa-money-check-alt mr-2"></i>{{__('Open a new ticket')}}
  33. </h5>
  34. </div>
  35. <div class="card-body">
  36. <div class="form-group col-sm-12 {{ $errors->has('title') ? ' has-error' : '' }}">
  37. <label for="title" class="control-label">Title</label>
  38. <input id="title" type="text" class="form-control" name="title" value="{{ old('title') }}">
  39. @if ($errors->has('title'))
  40. <span class="help-block">
  41. <strong>{{ $errors->first('title') }}</strong>
  42. </span>
  43. @endif
  44. </div>
  45. @if ($servers->count() >= 1)
  46. <div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
  47. <label for="server" class="control-label">Servers</label>
  48. <select id="server" type="server" class="form-control" name="server">
  49. <option value="">Select Servers</option>
  50. @foreach ($servers as $server)
  51. <option value="{{ $server->id }}">{{ $server->name }}</option>
  52. @endforeach
  53. </select>
  54. @if ($errors->has('category'))
  55. <span class="help-block">
  56. <strong>{{ $errors->first('ticketcategory') }}</strong>
  57. </span>
  58. @endif
  59. </div>
  60. @endif
  61. <div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
  62. <label for="ticketcategory" class="control-label">Category</label>
  63. <select id="ticketcategory" type="ticketcategory" class="form-control" name="ticketcategory">
  64. <option value="">Select Category</option>
  65. @foreach ($ticketcategories as $ticketcategory)
  66. <option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
  67. @endforeach
  68. </select>
  69. @if ($errors->has('category'))
  70. <span class="help-block">
  71. <strong>{{ $errors->first('ticketcategory') }}</strong>
  72. </span>
  73. @endif
  74. </div>
  75. <div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
  76. <label for="priority" class="control-label">Priority</label>
  77. <select id="priority" type="" class="form-control" name="priority">
  78. <option value="">Select Priority</option>
  79. <option value="Low">Low</option>
  80. <option value="Medium">Medium</option>
  81. <option value="High">High</option>
  82. </select>
  83. @if ($errors->has('priority'))
  84. <span class="help-block">
  85. <strong>{{ $errors->first('priority') }}</strong>
  86. </span>
  87. @endif
  88. </div>
  89. </div>
  90. <div class="card-footer">
  91. <button type="submit" class="btn btn-primary">
  92. {{__('Open Ticket')}}
  93. </button>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="col-lg-6">
  98. <div class="card">
  99. <div class="card-header">
  100. <h5 class="card-title">
  101. <i class="fas fa-money-check-alt mr-2"></i>{{__('Ticket details')}}
  102. </h5>
  103. </div>
  104. <div class="card-body">
  105. <div class="form-group col-sm-12 {{ $errors->has('message') ? ' has-error' : '' }}">
  106. <label for="message" class="control-label">Message</label>
  107. <textarea rows="8" id="message" class="form-control" name="message"></textarea>
  108. @if ($errors->has('message'))
  109. <span class="help-block">
  110. <strong>{{ $errors->first('message') }}</strong>
  111. </span>
  112. @endif
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </form>
  119. </div>
  120. </section>
  121. <!-- END CONTENT -->
  122. @endsection