add.blade.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses'); ?>
  2. @extends('dev.core.using')
  3. @section('content')
  4. <style>
  5. .prev-holder, .className-wrap, .description-wrap, .tooltip-element, .copy-button {
  6. display:none !important;
  7. }
  8. .form-field{
  9. flex:0 0 50%;
  10. position:relative;
  11. width:50%;
  12. outline: 1px solid #a9a9a9;
  13. }
  14. .frmb {
  15. display:flex !important;
  16. flex-wrap:wrap !important;
  17. min-height:40px !important;
  18. }
  19. input, select {
  20. border: 0 !important;
  21. background: transparent !important;
  22. border-bottom: 1px solid #cdcdcd !important;
  23. }
  24. .tb-container{
  25. background: #fff;
  26. margin-top: 1em;
  27. }
  28. tbody > tr {
  29. line-height: 45px !important;
  30. min-height: 45px !important;
  31. height: 45px !important;
  32. }
  33. </style>
  34. <br/>
  35. <br/>
  36. <form action="{{route('pembuatan-program.create')}}" method="POST" enctype="multipart/form-data" id="form-create">
  37. @csrf
  38. <input type="hidden" name="total_label" id="total_label">
  39. <input type="hidden" name="total_tipe_kolom" id="total_tipe_kolom">
  40. <input type="hidden" name="total_master_option" id="total_master_option">
  41. <input type="hidden" name="total_required" id="total_required">
  42. <input type="hidden" name="total_description" id="total_description">
  43. <div class="col">
  44. <div class="form-group">
  45. <label for="">Nama Program *</label>
  46. <input type="text" class="form-control" id="namaProgram" name="nama" placeholder="No Data Available" required style="text-transform:uppercase" >
  47. <!-- <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> -->
  48. </div>
  49. <div class="form-group">
  50. <label for="">Kategori *</label>
  51. <select class="form-control" id="tipe" name="tipe" required>
  52. <option value="0">Program Perjanjian Kinerja</option>
  53. <option value="1">Program Perjanjian Non Kinerja</option>
  54. </select>
  55. <!-- <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> -->
  56. </div>
  57. <div class="form-group">
  58. <label for="">Icon Program</label>
  59. <input name="logo" class="form-control" type="file" id="file_input" multiple />
  60. <!-- <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> -->
  61. </div>
  62. <div class="col-md-4" style="display:none" id="card_file_preview">
  63. <div class="card">
  64. <div class="card-body pt-2" style="max-height:185px">
  65. Preview:<br>
  66. <center>
  67. <img src="" id="file_preview" style="width:130px">
  68. </center>
  69. </div>
  70. </div>
  71. </div><br>
  72. <div class="form-group">
  73. <div class="custom-control custom-checkbox mb-3">
  74. <input class="custom-control-input" id="customCheck1" type="checkbox" name="is_required" value="1">
  75. <label class="custom-control-label" for="customCheck1">Pilih jika sub program wajib diisi</label>
  76. </div>
  77. </div>
  78. </form>
  79. <div class="tb-container">
  80. <div class="row" style="padding:20px">
  81. <div class="col-md-8"></div>
  82. <div class="col-md-4">
  83. <button type="button" class="btn btn-primary confirmation" id="btn-submit" data-target="form-create" style="background: #193865"><i class="fa fa-save"></i> Simpan Perubahan</button>
  84. <a href="{{route('pembuatan-program')}}" class="btn btn-primary" id="btn-back" style="background: #fff;color: #193865">Batal</a>
  85. </div>
  86. </div>
  87. </div>
  88. <script>
  89. $('#file_input').on('change',function(){
  90. var file = $(this).get(0).files[0];
  91. if(file){
  92. var reader = new FileReader();
  93. reader.onload = function(){
  94. $('#file_preview').attr('src',reader.result);
  95. $('#card_file_preview').show();
  96. }
  97. reader.readAsDataURL(file);
  98. }else{
  99. $('#card_file_preview').hide();
  100. }
  101. });
  102. </script>
  103. @endsection