Guest User

Untitled

a guest
Oct 1st, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 6.23 KB | None | 0 0
  1. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
  7.     <link rel="stylesheet" type="text/css" href="../assets/css/bootstrap-clearmin.min.css">
  8.     <link rel="stylesheet" type="text/css" href="../assets/css/roboto.css">
  9.     <link rel="stylesheet" type="text/css" href="../assets/css/material-design.css">
  10.     <link rel="stylesheet" type="text/css" href="../assets/css/small-n-flat.css">
  11.     <link rel="stylesheet" type="text/css" href="../assets/css/font-awesome.min.css">
  12.     <title>New client</title>
  13. </head>
  14. <jsp:include page="header.jsp"></jsp:include>
  15.  
  16. <div id="global">
  17.     <div class="container-fluid cm-container-white">
  18.         <h2 style="margin-top:0;">Add new client</h2>
  19.     </div>
  20.     <div class="container-fluid">
  21.         <div class="panel panel-default">
  22.             <div class="panel-body">
  23.                 <div class="input-group">
  24.                     <table class="table">
  25.                         <thead>
  26.                         <tr>
  27.                             <th></th>
  28.                             <th></th>
  29.                         </tr>
  30.                         </thead>
  31.                         <tbody>
  32.                         <tr>
  33.                             <td><input id="name" type="text" class="form-control" placeholder="Enter name"></td>
  34.                             <td>
  35.                                 <font color="blue">
  36.                                     <c:if test="${nameStat!=null}">
  37.                                         ${nameStat}
  38.                                     </c:if>
  39.                                 </font>
  40.                             </td>
  41.                         </tr>
  42.                         <tr>
  43.                             <td><input id="surName" type="text" class="form-control" placeholder="Surname"></td>
  44.                             <td>
  45.                                 <font color="blue">
  46.                                     <c:if test="${surName!=null}">
  47.                                         ${surName}
  48.                                     </c:if>
  49.                                 </font>
  50.                             </td>
  51.                         </tr>
  52.                         <tr>
  53.                             <td><input id="birthday" type="date" class="form-control" placeholder="Birthday date"></td>
  54.                             <font color="blue">
  55.                                 <c:if test="${birthday!=null}">
  56.                                     ${birthday}
  57.                                 </c:if>
  58.                             </font>
  59.                         </tr>
  60.                         <tr>
  61.                             <td><input id="passport" type="text" class="form-control" placeholder="Passport"></td>
  62.                             <font color="blue">
  63.                                 <c:if test="${passport!=null}">
  64.                                     ${passport}
  65.                                 </c:if>
  66.                             </font>
  67.                         </tr>
  68.                         <tr>
  69.                             <td><input id="adress" type="text" class="form-control" placeholder="Adress"></td>
  70.                             <font color="blue">
  71.                                 <c:if test="${adress!=null}">
  72.                                     ${adress}
  73.                                 </c:if>
  74.                             </font>
  75.                         </tr>
  76.                         <tr>
  77.                             <td><input id="email" type="email" class="form-control" placeholder="Email"></td>
  78.                             <font color="blue">
  79.                                 <c:if test="${email!=null}">
  80.                                     ${email}
  81.                                 </c:if>
  82.                             </font>
  83.                         </tr>
  84.                         <tr>
  85.                             <td><input id="number" type="email" class="form-control" placeholder="Number"></td>
  86.                             <font color="blue">
  87.                                 <c:if test="${number!=null}">
  88.                                     ${number}
  89.                                 </c:if>
  90.                             </font>
  91.                         </tr>
  92.                         </tbody>
  93.                     </table>
  94.                 </div>
  95.             </div>
  96.             <div class="modal-footer">
  97.                 <form name="test" onclick="add()">
  98.                     <button type="submit" class="btn btn-success">Create</button>
  99.                 </form>
  100.                 <script>
  101.                     function add() {
  102.                         var name = document.getElementById('name').value;
  103.                         var surName = document.getElementById('surName').value;
  104.                         var birthday = document.getElementById('birthday').value;
  105.                         var passport = document.getElementById('passport').value;
  106.                         var adress = document.getElementById('adress').value;
  107.                         var email = document.getElementById('email').value;
  108.                         var number = document.getElementById('number').value;
  109.                         popBox();
  110.                         function popBox() {
  111.                             x = confirm('Are you sure? ');
  112.                             if (x == true) {
  113.                                 var xhr = new XMLHttpRequest();
  114.                                 xhr.open("DELETE", "adminNewClient?name=" + name + "&surName=" + surName
  115.                                        + "&birthday=" + birthday + "&passport=" + passport
  116.                                        + "&adress=" + adress + "&email=" + email + "&number=" + number, false);
  117.                                 xhr.send();
  118.  
  119.                             }
  120.                         }
  121.  
  122.                     }
  123.                 </script>
  124.             </div>
  125.         </div>
  126.     </div>
  127.     <c:if test="${newClient!=null}">
  128.         <div class="container-fluid cm-container-white">
  129.             <h2 align="center" style="margin-top:0;">Client added, password generated</h2>
  130.         </div>
  131.     </c:if>
  132. </div>
  133. <jsp:include page="footer.jsp"></jsp:include>
  134. </html>
Advertisement
Add Comment
Please, Sign In to add comment