leave_apply.blade.php 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. <header class="panel-heading" style="height:50px;">
  13. <div class="pull-left">
  14. {{$title}}
  15. </div>
  16. <div>
  17. <a style="margin-left: 3px" href="{{ url('admin/leave_requests') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> Leave List</a>
  18. </div>
  19. </header>
  20. <div class="panel-body">
  21. <form action="{{ url('admin/leave_requests/store') }}" method="POST" class="form-horizontal" role="form">
  22. {{ csrf_field() }}
  23. <div class="form-group">
  24. <label for="purpose" class="col-sm-2">Leave Purpose: </label>
  25. <div class="col-sm-6">
  26. <select name="purpose" id="purpose" class="form-control" required>
  27. <option value="">Select leave Purpose</option>
  28. @if($leave_type)
  29. @foreach($leave_type as $head)
  30. <option value="{{ $head->id }}">{{ $head->name }}</option>
  31. @endforeach
  32. @endif
  33. </select>
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <label for="purpose" class="col-sm-2">Apply To: </label>
  38. <div class="col-sm-6">
  39. <select name="user_id" id="user_id" class="form-control" required>
  40. <option value="">Select User</option>
  41. @if($users)
  42. @foreach($users as $user)
  43. <option value="{{ $user->id }}">
  44. {{ $user->name }}
  45. </option>
  46. @endforeach
  47. @endif
  48. </select>
  49. </div>
  50. </div>
  51. <div class="form-group">
  52. <label for="due_date" class="col-sm-2">From :</label>
  53. <div class="col-sm-6">
  54. <input type='text' name="from" id="from" class="form-control date" placeholder="From Date" required="">
  55. </div>
  56. </div>
  57. <div class="form-group">
  58. <label for="due_date" class="col-sm-2">To :</label>
  59. <div class="col-sm-6">
  60. <input type='text' name="to" id="to" class="form-control date" placeholder="To Date" required="">
  61. </div>
  62. </div>
  63. <div class="form-group">
  64. <label for="description" class="col-sm-2">Application</label>
  65. <div class="col-sm-6">
  66. <textarea name="description" rows="7" id="description" class="form-control" placeholder="Description" required=""></textarea>
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <div class="col-sm-10 col-sm-offset-2">
  71. <button type="submit" class="btn btn-info">Request</button>
  72. </div>
  73. </div>
  74. </form>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <script type="text/javascript">
  81. $(document).ready(function() {
  82. $( ".date" ).datepicker({
  83. changeMonth: true,
  84. changeYear: true,
  85. dateFormat:"yy-mm-dd"
  86. });
  87. });
  88. </script>
  89. @endsection