muhammad_nasif

imei_entry.html

Dec 9th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.24 KB | None | 0 0
  1. <!DOCTYPE html>
  2. {% load static %}
  3. <html lang="en">
  4. <head>
  5.     <meta charset="UTF-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.  
  8.     <!-- Bootstrap CSS -->
  9.     <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  10.  
  11.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
  12.          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  13.  
  14.  
  15.  
  16.     <title>IMEI ENTRY</title>
  17. </head>
  18. <body>
  19.  
  20. <div class="container">
  21.     <div class="jumbotron">
  22.         <div class="card text-center">
  23.             <div class="card-header">
  24.                 <form method="POST" action="">
  25.                     {% csrf_token %}
  26.                     <input type="number" placeholder="Enter IMEI" name="imei_value">
  27.  
  28.                     {% if remaining == 0 %}
  29.                         <button type="button" class="btn btn-primary" disabled>Add</button>
  30.                     {% else %}
  31.                         <button type="submit" class="btn btn-primary" name="add_imei">Add</button>                    {% endif %}
  32.  
  33.                 </form>
  34.             </div>
  35.             <div class="card-body">
  36.                 {% if total_value != 0 %}
  37.                     <table class="table table-hover">
  38.                         <thead>
  39.                         <tr>
  40.                             <th scope="col">IMEI</th>
  41.                         </tr>
  42.                         </thead>
  43.                         <tbody>
  44.                         {% for data in table %}
  45.                             <tr>
  46.                                 <td>{{ data.imei }}</td>
  47.                             </tr>
  48.                         {% endfor %}
  49.                         </tbody>
  50.                     </table>
  51.                 {% else %}
  52.                     <p>No data to show...</p>
  53.                 {% endif %}
  54.  
  55.  
  56.             </div>
  57.             <div class="card-footer text-muted">
  58.                 Entry left: {{ remaining }}
  59.                 <br>
  60.                 {% if remaining == 0 %}
  61.                     <a class="btn btn-primary" href="submit_imei" role="button">Add to Database</a>
  62.                 {% else %}
  63.                     <button type="button" class="btn btn-lg btn-primary" disabled>Add to Database</button>
  64.                 {% endif %}
  65.             </div>
  66.  
  67.         </div>
  68.     </div>
  69. </div>
  70. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
  71.        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
  72.        crossorigin="anonymous"></script>
  73. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
  74.        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
  75.        crossorigin="anonymous"></script>
  76. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
  77.        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
  78.        crossorigin="anonymous"></script>
  79. <script>
  80.     if (window.history.replaceState) {
  81.         window.history.replaceState(null, null, window.location.href);
  82.     }
  83. </script>
  84. </body>
  85. </html>
Advertisement
Add Comment
Please, Sign In to add comment