You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
4.8 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Create Order</title>
  6. <!-- Google Font -->
  7. <link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
  8. <!-- Bootstrap CSS -->
  9. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
  10. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
  11. <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
  12. <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
  13. <!-- Include Font Awesome -->
  14. <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
  15. <style>
  16. label {
  17. font-weight: 700;
  18. color: #2d5263;
  19. }
  20. /*for uploading fields*/
  21. .custom-file-upload {
  22. position: relative;
  23. display: flex;
  24. align-items: center;
  25. border: 1px solid #d9dde4;
  26. border-radius: 5px;
  27. padding: 5px;
  28. background-color: #f9fafb;
  29. cursor: pointer;
  30. margin-top: 5px;
  31. }
  32. .custom-file-upload input[type="file"] {
  33. position: absolute;
  34. left: 0;
  35. top: 0;
  36. width: 100%;
  37. height: 100%;
  38. opacity: 0;
  39. cursor: pointer;
  40. }
  41. .custom-file-upload label {
  42. display: flex;
  43. justify-content: space-between;
  44. width: 100%;
  45. align-items: center;
  46. }
  47. .upload-text {
  48. color: #a6adb5;
  49. font-weight: 700;
  50. }
  51. .upload-icon i {
  52. color: #a6adb5;
  53. font-size: 18px;
  54. }
  55. .file-name {
  56. margin-left: 10px;
  57. color: #414f69;
  58. font-size: 14px;
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <div class="row align-items-center justify-content-center" style="color: white;background-color:#414f69 ;padding: 10px;">
  64. <h3 class="title resizable-content" >Create Order</h3>
  65. </div>
  66. <div class="container mt-4">
  67. <div class="mt-1">
  68. </div>
  69. <!-- Card Section -->
  70. <div class="card p-3 resizable-content" style="margin-bottom: 8px;color: #414f69;">
  71. <!-- Add the resizable-content class to the card sections -->
  72. <div class="card mb-3 resizable-content">
  73. <div class="card-header text-white" style="background-color: #414f69;">Order Details
  74. </div>
  75. <div class="card-body">
  76. <div class="row">
  77. <div class="col-md-6">
  78. <label>Order Number:</label>
  79. <input type="text" class="form-control" value="" placeholder="Enter Order Number">
  80. </div>
  81. <div class="col-md-6">
  82. <label>Order Date:</label>
  83. <input type="date" class="form-control" value="">
  84. </div>
  85. <div class="col-md-6">
  86. <label>Order Title:</label>
  87. <input type="email" class="form-control" value="" placeholder="Enter Order Title">
  88. </div>
  89. <div class="col-md-6">
  90. <label>Number Of Staff Required:</label>
  91. <input type="number" class="form-control" value="" placeholder="Enter Staff Required...">
  92. </div>
  93. <div class="col-md-6">
  94. <label>Order Description:</label>
  95. <textarea class="form-control" id="details" rows="3" placeholder="description..."
  96. maxlength="400"></textarea>
  97. </div>
  98. <div class="col-md-6">
  99. <label>Order Document:</label>
  100. <div class="custom-file-upload">
  101. <input type="file" id="file-upload" class="form-control" onchange="displayFileName()">
  102. <label for="file-upload" id="file-label">
  103. <span class="upload-text" id="upload-text">Upload Order Document</span>
  104. <span class="upload-icon">
  105. <i class="fas fa-file-upload"></i>
  106. </span>
  107. </label>
  108. <span id="file-name" class="file-name"></span>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <button class="btn btn-sm" style="background-color: #414f69; color: white;" id="createorder">Create Order</button>
  115. </div>
  116. </div>
  117. <!-- Bootstrap JS -->
  118. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  119. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
  120. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
  121. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  122. <!-- JavaScript to handle button clicks -->
  123. <script>
  124. function displayFileName() {
  125. const fileInput = document.getElementById('file-upload');
  126. const fileNameSpan = document.getElementById('file-name');
  127. const fileName = fileInput.files[0].name;
  128. fileNameSpan.textContent = fileName;
  129. }
  130. $(document).ready(function () {
  131. $('#createorder').click(function () {
  132. Swal.fire({
  133. title: 'Success!',
  134. text: 'Order Created Successfully',
  135. icon: 'success',
  136. confirmButtonText: 'OK',
  137. background: '#f5f5f5',
  138. confirmButtonColor: '#414f69'
  139. });
  140. });
  141. });
  142. </script>
  143. </body>
  144. </html>