edit.blade.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <div class="form-group">
  30. <label for="purpose" class="col-sm-3 col-md-offset-1">Send To : </label>
  31. <div class="col-sm-6">
  32. <select class="form-control" id="select2" name="send_to[]" required="" multiple="multiple" data-placeholder="Please Select"
  33. style="width: 100%;">
  34. <option value="all"> All </option>
  35. @foreach($employee as $row)
  36. <option value="{{$row->id}}" @if(in_array($row->id,$sendto)){{'selected'}} @endif> {{ $row->name }} </option>
  37. @endforeach
  38. </select>
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. <label for="purpose" class="col-sm-3 col-md-offset-1">Notice Title : </label>
  43. <div class="col-sm-6">
  44. <input type='text' name="notice_title" class="form-control" placeholder="Notice Title" value="{{ $notice->notice_title }}" required="">
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <label for="due_date" class="col-sm-3 col-md-offset-1">Expire Date :</label>
  49. <div class="col-sm-6">
  50. <input type='text' name="expire_date" id="from" class="form-control date" placeholder="Expire Date" value="{{ $notice->expire_date }}" required="">
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <label for="description" class="col-sm-3 col-md-offset-1">Description :</label>
  55. <div class="col-sm-6">
  56. <textarea name="description" rows="7" class="form-control" placeholder="Description" required="">{{ $notice->description }}"</textarea>
  57. </div>
  58. </div>
  59. <!-- <div class="form-group">
  60. <label for="description" class="col-sm-3 col-md-offset-1">Attached file :</label>
  61. <div class="col-sm-6">
  62. <input type='file' name="attached[]" class='form-control' multiple>
  63. </div>
  64. </div> -->
  65. <div class="form-group">
  66. <div class="col-sm-10 col-sm-offset-4">
  67. <button type="submit" class="btn btn-info"> Send </button>
  68. </div>
  69. </div>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="modal fade" id="modalPreview">
  76. <div class="modal-dialog" style='width: 70%;'>
  77. </div>
  78. </div>
  79. @stop
  80. @section('style')
  81. <style>
  82. .modal-dialog {
  83. width: 70% !important;
  84. height: 70% !important;
  85. }
  86. .modal-content {
  87. height: auto;
  88. min-height: 70% !important;
  89. border-radius: 0;
  90. }
  91. </style>
  92. @stop
  93. @section('script')
  94. <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
  95. <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
  96. <script src="{{ asset('/assets/') }}/select2/dist/js/select2.full.min.js"></script>
  97. <script>
  98. CKEDITOR.replace( 'editor1' );
  99. </script>
  100. <script type="text/javascript">
  101. $(document).ready(function() {
  102. $( ".date" ).datepicker({
  103. changeMonth: true,
  104. changeYear: true,
  105. dateFormat:"yy-mm-dd"
  106. });
  107. });
  108. </script>
  109. <script>
  110. $(function () {
  111. //Initialize Select2 Elements
  112. $('#select2').select2()
  113. })
  114. </script>
  115. @if(Session::has('msg'))
  116. <div class="alert alert-success center-block msg_alt" >
  117. <a class="close" data-dismiss="alert" href="#">&times;</a>
  118. <strong><i class="fa fa-check"></i></strong>&nbsp;
  119. {{Session::get('msg')}}
  120. </div>
  121. @endif
  122. @stop