add.blade.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. @extends('layouts.master')
  2. @section('content')
  3. <!-- DataTables -->
  4. <link rel="stylesheet" href="{{ asset('/assets/') }}/css/dataTables.bootstrap.min.css">
  5. <link rel="stylesheet" href="{{ asset('/assets/') }}/switch/rcswitcher.css">
  6. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/pnotify.css">
  7. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweetalert.css">
  8. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweet-alert-animations.css">
  9. <!-- Select2 -->
  10. <link rel="stylesheet" href="{{asset('/assets/') }}/select2/dist/css/select2.min.css">
  11. <script src="{{ asset('assets/ckeditor/ckeditor.js')}}"></script>
  12. <div class="row">
  13. <div class="col-md-8 col-md-offset-2">
  14. <div class="panel panel-default">
  15. <!-- Default panel contents -->
  16. <div class="panel-heading"></div>
  17. <header class="panel-heading" style="height:50px;">
  18. <div class="pull-left">
  19. {{$title}}
  20. </div>
  21. <div>
  22. @if(\Auth::user()->utype==1)
  23. <a href="{{ url('admin/notice_board') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> Notice Board</a> <br><br>
  24. @endif
  25. </div>
  26. </header>
  27. <div class="panel-body">
  28. <form action="{{ url('admin/notice_board/store') }}" method="POST" class="form-horizontal" enctype="multipart/form-data">
  29. {{ csrf_field() }}
  30. <div class="form-group">
  31. <label for="purpose" class="col-sm-3 col-md-offset-1">Send To : </label>
  32. <div class="col-sm-6">
  33. <select class="form-control" id="select2" name="send_to[]" required="" multiple="multiple" data-placeholder="Please Select"
  34. style="width: 100%;">
  35. <option value="all"> All </option>
  36. @foreach($employee as $row)
  37. <option value="{{$row->id}}"> {{ $row->name }} </option>
  38. @endforeach
  39. </select>
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label for="purpose" class="col-sm-3 col-md-offset-1">Notice Title : </label>
  44. <div class="col-sm-6">
  45. <input type='text' name="notice_title" class="form-control" placeholder="Notice Title" required="">
  46. </div>
  47. </div>
  48. <div class="form-group">
  49. <label for="due_date" class="col-sm-3 col-md-offset-1">Expire Date :</label>
  50. <div class="col-sm-6">
  51. <input type='text' name="expire_date" id="from" class="form-control date" placeholder="Expire Date" required="">
  52. </div>
  53. </div>
  54. <div class="form-group">
  55. <label for="description" class="col-sm-3 col-md-offset-1">Description :</label>
  56. <div class="col-sm-6">
  57. <textarea name="description" rows="7" class="form-control" placeholder="Description" required=""></textarea>
  58. </div>
  59. </div>
  60. <!-- <div class="form-group">
  61. <label for="description" class="col-sm-3 col-md-offset-1">Attached file :</label>
  62. <div class="col-sm-6">
  63. <input type='file' name="attached[]" class='form-control' multiple>
  64. </div>
  65. </div> -->
  66. <div class="form-group">
  67. <div class="col-sm-10 col-sm-offset-4">
  68. <button type="submit" class="btn btn-info"> Send </button>
  69. </div>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="modal fade" id="modalPreview">
  77. <div class="modal-dialog" style='width: 70%;'>
  78. </div>
  79. </div>
  80. @stop
  81. @section('style')
  82. <style>
  83. .modal-dialog {
  84. width: 70% !important;
  85. height: 70% !important;
  86. }
  87. .modal-content {
  88. height: auto;
  89. min-height: 70% !important;
  90. border-radius: 0;
  91. }
  92. </style>
  93. @stop
  94. @section('script')
  95. <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
  96. <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
  97. <script src="{{ asset('/assets/') }}/select2/dist/js/select2.full.min.js"></script>
  98. <script>
  99. CKEDITOR.replace( 'editor1' );
  100. </script>
  101. <script type="text/javascript">
  102. $(document).ready(function() {
  103. $( ".date" ).datepicker({
  104. changeMonth: true,
  105. changeYear: true,
  106. dateFormat:"yy-mm-dd"
  107. });
  108. });
  109. </script>
  110. <script>
  111. $(function () {
  112. //Initialize Select2 Elements
  113. $('#select2').select2()
  114. })
  115. </script>
  116. @if(Session::has('msg'))
  117. <div class="alert alert-success center-block msg_alt" >
  118. <a class="close" data-dismiss="alert" href="#">&times;</a>
  119. <strong><i class="fa fa-check"></i></strong>&nbsp;
  120. {{Session::get('msg')}}
  121. </div>
  122. @endif
  123. @stop