- <!DOCTYPE html>
- <html lang="en">
- <head>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
- <style>
- body {
- padding: 15px;
- background-image: url("/static/bg.png");
- background-repeat: no-repeat;
- }
- .table-hideable td,
- .table-hideable th {
- width: auto;
- transition: width .5s, margin .5s;
- }
- .btn-condensed.btn-condensed {
- padding: 0px 0px 0px 0px;
- box-shadow: none;
- }
- .hide-col {
- width: 0 !important;
- height: 0 !important;
- display: none !important;
- overflow: hidden !important;
- margin: 0 !important;
- padding: 0 !important;
- border: none !important;
- }
- .thbg
- {
- background-image: url("/static/fieldbg.png");
- }
- .thbgg
- {
- background-color:#b21f2d ;
- color: #FFF;
- }
- </style>
- <link rel="stylesheet" href={{ url_for('static', filename='css/bootstrap.css') }}>
- <script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js" integrity="sha384-xymdQtn1n3lH2wcu0qhcdaOpQwyoarkgLVxC/wZ5q7h9gHtxICrpcaSUfygqZGOe" crossorigin="anonymous"></script>
- <meta charset="UTF-8">
- <title>Sales Search</title>
- </head>
- <body>
- <div id="wrapper">
- <div class="corner-ribbon top-left red shadow">ALPHA</div>
- <div align="center" class="p"><img src="/static/sdclogopng.png"> </div>
- <div class="container-fluid" id="container-fluid">
- <div class="row">
- <div class="col-sm-9">
- <div class="form-group">
- <form method="post" class="form-horizontal" role="form" name="form" id="form" action="/search">
- <div class="form-row form-group">
- <div class="col-auto">
- <input type="text" name="startchass" class="form-control form-control-sm thbg" placeholder="Chassis Number">
- </div>
- <div class="col-auto">
- <input type="text" name="cusname" class="form-control form-control-sm thbg" placeholder="Customer name">
- </div>
- <div class="col-auto">
- <select name="chassistype1" class="form-control form-control-sm thbg" title="chassis type">
- <option disabled selected value>Select chassis type</option>
- {% for option in options %}
- <option class="form-control form-control-sm thbg" value="{{ option[0] }}">{{ option[0] }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="col-auto">
- <select name="axleqty" class="form-control form-control-sm thbg" title="chassis type">
- <option disabled selected value>Axle quantity</option>
- {% for axleopt in axleopts %}
- <option class="form-control form-control-sm thbg" value="{{ axleopt[0] }}">{{ axleopt[0] }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="col-auto">
- <input type="text" name="tyres" class="form-control form-control-sm thbg" placeholder="tyre type" id="1">
- </div></div>
- <div class="form-row form-group">
- <div class="col-auto">
- <input type="text" name="extlength" class="form-control form-control-sm thbg" placeholder="External Length" id="2">
- </div>
- <div class="col-auto">
- <input type="text" name="neck" class="form-control form-control-sm thbg" placeholder="Neck Dimensions" id="3">
- </div>
- <div class="col-auto">
- <input type="text" name="stepheight" class="form-control form-control-sm thbg" placeholder="Step height" id="3">
- </div>
- <div class="col-auto">
- <input type="text" name="reardeckheight" class="form-control form-control-sm thbg" placeholder="reardeckheight" id="4">
- </div>
- <div class="col-auto">
- <input type="text" name="siderave" class="form-control form-control-sm thbg" placeholder="Siderave" id="5">
- </div></div>
- <div class="form-row form-group">
- <div class="col-auto">
- <input type="text" name="steer" class="form-control form-control-sm thbg" placeholder="Steer option" id="6">
- </div>
- <div class="col-auto">
- <input type="text" name="sockets" class="form-control form-control-sm thbg" placeholder="Socket count" id="7">
- </div>
- <div class="col-auto">
- <input type="text" name="containertwistlock" class="form-control form-control-sm thbg" placeholder="Twist locks" id="8">
- </div>
- <div class="col-auto">
- <input type="text" name="headboard" class="form-control form-control-sm thbg" placeholder="headboard" id="9">
- </div>
- <input type="submit" type="" value="Submit using POST" class="btn btn-danger btn-sm" id="button" name="button"></div>
- </form>
- </div></div><div class=col-sm-3> <div class="refinewidth"> <h6 style="color:#fff">search for specific items/text here:</h6>
- <input class="form-control form-control-sm thbg" id="myInput" type="text" placeholder="Search.."></div><br></div></div></div>
- <div class="col-sm-4 alert alert-info"><strong>Click on a column header to exclude it from your results</strong></div>
- {% block body %}
- <div class="table-responsive">
- <table class="table table-condensed table-hover table-bordered table-hideable table-sm">
- <thead class="table-hideable thbgg">
- <tr>
- <th class="hide-column">Chassis Number </th>
- <th class="hide-column">Customer name</th>
- <th class="hide-column">Chassis Type</th>
- <th class="hide-column">Axles</th>
- <th class="hide-column">Tyre</th>
- <th class="hide-column">External Length</th>
- <th class="hide-column">Neck</th>
- <th class="hide-column">Step height</th>
- <th class="hide-column">Rear Deck height</th>
- <th class="hide-column">Siderave</th>
- <th class="hide-column">Steer</th>
- <th class="hide-column">Sockets</th>
- <th class="hide-column">Twistlocks</th>
- <th class="hide-column">Headboard</th>
- </tr>
- </thead>
- <tbody id="myTable">
- {% for item in result2 %}
- <tr>
- <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>
- </tr>
- {% endfor %}
- </tbody>
- <tfoot class="show-column-footer">
- <tr>
- <th colspan="14"><a class="show-column" href="#">Click here to show hidden columns</a></th>
- </tr>
- </tfoot>
- </table>
- </div>
- {% endblock %}
- <script>
- $(document).ready(function(){
- $("#myInput").on("keyup", function() {
- var value = $(this).val().toLowerCase();
- $("#myTable tr").filter(function() {
- $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
- });
- });
- });
- </script>
- <script type=text/javascript src="{{ url_for('static', filename='ajax.js') }}"></script>
- <script type=text/javascript src="{{ url_for('static', filename='form.js') }}"></script>
- </div>
- </body>
- </html>