spacepaste

  1.  
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
  6. <style>
  7. body {
  8. padding: 15px;
  9. background-image: url("/static/bg.png");
  10. background-repeat: no-repeat;
  11. }
  12. .table-hideable td,
  13. .table-hideable th {
  14. width: auto;
  15. transition: width .5s, margin .5s;
  16. }
  17. .btn-condensed.btn-condensed {
  18. padding: 0px 0px 0px 0px;
  19. box-shadow: none;
  20. }
  21. .hide-col {
  22. width: 0 !important;
  23. height: 0 !important;
  24. display: none !important;
  25. overflow: hidden !important;
  26. margin: 0 !important;
  27. padding: 0 !important;
  28. border: none !important;
  29. }
  30. .thbg
  31. {
  32. background-image: url("/static/fieldbg.png");
  33. }
  34. .thbgg
  35. {
  36. background-color:#b21f2d ;
  37. color: #FFF;
  38. }
  39. </style>
  40. <link rel="stylesheet" href={{ url_for('static', filename='css/bootstrap.css') }}>
  41. <script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js" integrity="sha384-xymdQtn1n3lH2wcu0qhcdaOpQwyoarkgLVxC/wZ5q7h9gHtxICrpcaSUfygqZGOe" crossorigin="anonymous"></script>
  42. <meta charset="UTF-8">
  43. <title>Sales Search</title>
  44. </head>
  45. <body>
  46. <div id="wrapper">
  47. <div class="corner-ribbon top-left red shadow">ALPHA</div>
  48. <div align="center" class="p"><img src="/static/sdclogopng.png"> </div>
  49. <div class="container-fluid" id="container-fluid">
  50. <div class="row">
  51. <div class="col-sm-9">
  52. <div class="form-group">
  53. <form method="post" class="form-horizontal" role="form" name="form" id="form" action="/search">
  54. <div class="form-row form-group">
  55. <div class="col-auto">
  56. <input type="text" name="startchass" class="form-control form-control-sm thbg" placeholder="Chassis Number">
  57. </div>
  58. <div class="col-auto">
  59. <input type="text" name="cusname" class="form-control form-control-sm thbg" placeholder="Customer name">
  60. </div>
  61. <div class="col-auto">
  62. <select name="chassistype1" class="form-control form-control-sm thbg" title="chassis type">
  63. <option disabled selected value>Select chassis type</option>
  64. {% for option in options %}
  65. <option class="form-control form-control-sm thbg" value="{{ option[0] }}">{{ option[0] }}</option>
  66. {% endfor %}
  67. </select>
  68. </div>
  69. <div class="col-auto">
  70. <select name="axleqty" class="form-control form-control-sm thbg" title="chassis type">
  71. <option disabled selected value>Axle quantity</option>
  72. {% for axleopt in axleopts %}
  73. <option class="form-control form-control-sm thbg" value="{{ axleopt[0] }}">{{ axleopt[0] }}</option>
  74. {% endfor %}
  75. </select>
  76. </div>
  77. <div class="col-auto">
  78. <input type="text" name="tyres" class="form-control form-control-sm thbg" placeholder="tyre type" id="1">
  79. </div></div>
  80. <div class="form-row form-group">
  81. <div class="col-auto">
  82. <input type="text" name="extlength" class="form-control form-control-sm thbg" placeholder="External Length" id="2">
  83. </div>
  84. <div class="col-auto">
  85. <input type="text" name="neck" class="form-control form-control-sm thbg" placeholder="Neck Dimensions" id="3">
  86. </div>
  87. <div class="col-auto">
  88. <input type="text" name="stepheight" class="form-control form-control-sm thbg" placeholder="Step height" id="3">
  89. </div>
  90. <div class="col-auto">
  91. <input type="text" name="reardeckheight" class="form-control form-control-sm thbg" placeholder="reardeckheight" id="4">
  92. </div>
  93. <div class="col-auto">
  94. <input type="text" name="siderave" class="form-control form-control-sm thbg" placeholder="Siderave" id="5">
  95. </div></div>
  96. <div class="form-row form-group">
  97. <div class="col-auto">
  98. <input type="text" name="steer" class="form-control form-control-sm thbg" placeholder="Steer option" id="6">
  99. </div>
  100. <div class="col-auto">
  101. <input type="text" name="sockets" class="form-control form-control-sm thbg" placeholder="Socket count" id="7">
  102. </div>
  103. <div class="col-auto">
  104. <input type="text" name="containertwistlock" class="form-control form-control-sm thbg" placeholder="Twist locks" id="8">
  105. </div>
  106. <div class="col-auto">
  107. <input type="text" name="headboard" class="form-control form-control-sm thbg" placeholder="headboard" id="9">
  108. </div>
  109. <input type="submit" type="" value="Submit using POST" class="btn btn-danger btn-sm" id="button" name="button"></div>
  110. </form>
  111. </div></div><div class=col-sm-3> <div class="refinewidth"> <h6 style="color:#fff">search for specific items/text here:</h6>
  112. <input class="form-control form-control-sm thbg" id="myInput" type="text" placeholder="Search.."></div><br></div></div></div>
  113. <div class="col-sm-4 alert alert-info"><strong>Click on a column header to exclude it from your results</strong></div>
  114. {% block body %}
  115. <div class="table-responsive">
  116. <table class="table table-condensed table-hover table-bordered table-hideable table-sm">
  117. <thead class="table-hideable thbgg">
  118. <tr>
  119. <th class="hide-column">Chassis Number </th>
  120. <th class="hide-column">Customer name</th>
  121. <th class="hide-column">Chassis Type</th>
  122. <th class="hide-column">Axles</th>
  123. <th class="hide-column">Tyre</th>
  124. <th class="hide-column">External Length</th>
  125. <th class="hide-column">Neck</th>
  126. <th class="hide-column">Step height</th>
  127. <th class="hide-column">Rear Deck height</th>
  128. <th class="hide-column">Siderave</th>
  129. <th class="hide-column">Steer</th>
  130. <th class="hide-column">Sockets</th>
  131. <th class="hide-column">Twistlocks</th>
  132. <th class="hide-column">Headboard</th>
  133. </tr>
  134. </thead>
  135. <tbody id="myTable">
  136. {% for item in result2 %}
  137. <tr>
  138. <td>{{ item.startchass }}</td><td>{{ item.cusname }}</td><td>{{ item.chassistype1 }}<td>{{ item.axleqty }}</td><td>{{ item.tyres }}</td><td>{{ item.extlength }}</td><td>{{ item.neck }}</td><td>{{ item.stepheight }}</td><td>{{ item.reardeckheight }}</td><td>{{ item.siderave }}</td><td>{{ item.steer }}</td><td>{{ item.sockets }}</td><td>{{ item.containerstwistlock }}</td><td>{{ item.headboard }}</td>
  139. </tr>
  140. {% endfor %}
  141. </tbody>
  142. <tfoot class="show-column-footer">
  143. <tr>
  144. <th colspan="14"><a class="show-column" href="#">Click here to show hidden columns</a></th>
  145. </tr>
  146. </tfoot>
  147. </table>
  148. </div>
  149. {% endblock %}
  150. <script>
  151. $(document).ready(function(){
  152. $("#myInput").on("keyup", function() {
  153. var value = $(this).val().toLowerCase();
  154. $("#myTable tr").filter(function() {
  155. $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
  156. });
  157. });
  158. });
  159. </script>
  160. <script type=text/javascript src="{{ url_for('static', filename='ajax.js') }}"></script>
  161. <script type=text/javascript src="{{ url_for('static', filename='form.js') }}"></script>
  162. </div>
  163. </body>
  164. </html>
  165.