leave.blade.php 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. @extends('layouts.master')
  2. @section('content')
  3. <div class="content">
  4. @if ($message = Session::get('success'))
  5. <div class="alert alert-success">
  6. <p>{{ $message }}</p>
  7. </div>
  8. @endif
  9. <div class="row">
  10. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  11. <div class="panel panel-default">
  12. <div class="panel-heading">
  13. <h3 class="panel-title">Leave Request</h3>
  14. </div>
  15. <div class="panel-body">
  16. <form action="{{ url('user/leave_req') }}" method="POST" class="form-horizontal" role="form">
  17. {{ csrf_field() }}
  18. <div class="form-group">
  19. <label for="purpose" class="col-sm-2">Leave Purpose: </label>
  20. <div class="col-sm-6">
  21. <select name="purpose" id="purpose" class="form-control" required>
  22. <option value="">Select leave Purpose</option>
  23. @if($leave_type)
  24. @foreach($leave_type as $head)
  25. <option value="{{ $head->id }}">{{ $head->name }}</option>
  26. @endforeach
  27. @endif
  28. </select>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label for="purpose" class="col-sm-2">Apply To: </label>
  33. <div class="col-sm-6">
  34. <select name="user_id" id="user_id" class="form-control" required>
  35. <option value="">Select User</option>
  36. @if($users)
  37. @foreach($users as $user)
  38. <option value="{{ $user->id }}">
  39. {{ $user->name }}
  40. </option>
  41. @endforeach
  42. @endif
  43. </select>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label for="due_date" class="col-sm-2">From :</label>
  48. <div class="col-sm-6">
  49. <input type='text' name="from" id="from" class="form-control date" placeholder="From Date" required="">
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label for="due_date" class="col-sm-2">To :</label>
  54. <div class="col-sm-6">
  55. <input type='text' name="to" id="to" class="form-control date" placeholder="To Date" required="">
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label for="description" class="col-sm-2">Application</label>
  60. <div class="col-sm-6">
  61. <textarea name="description" rows="7" id="description" class="form-control" placeholder="Description" required=""></textarea>
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <div class="col-sm-10 col-sm-offset-2">
  66. <button type="submit" class="btn btn-info">Request</button>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <script type="text/javascript">
  76. $(document).ready(function() {
  77. $( ".date" ).datepicker({
  78. changeMonth: true,
  79. changeYear: true,
  80. dateFormat:"yy-mm-dd"
  81. });
  82. });
  83. </script>
  84. @endsection