Server IP : 162.213.251.212 / Your IP : 18.191.92.32 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/needapair.com/public/ |
Upload File : |
<!DOCTYPE html> <html> <head> <title> CMS </title> <meta charset="UTF-8"> <meta name="keywords" content="HTML, CSS, JavaScript"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <%- include('./parcials/cssLinks') %> </head> <body> <%- include('./parcials/header') %> <!-- ... (Previous HTML content) ... --> <main> <section class="register"> <div class="container"> <h2 class="theme-h2">CMS</h2> <form action="/api/admin/package/create" method="POST"> <input type="hidden" name="page" value="about"> <div class="form-content"> <div class="row g-4"> <div class="col-12"> <div class="input-field"> <label for="">Package Name</label> <input name="name" type="text" value="<%= package.name %>"> </div> </div> <div class="col-12"> <div class="input-field"> <label for="">Credits</label> <input name="name" type="number" value="<%= package.credits %>"> </div> </div> <div class="col-12"> <div class="input-field"> <label for="">Price</label> <div class="d-flex"> <input name="name" type="text" value="$"> <input name="name" type="number" value="<%= package.price %>"> </div> </div> </div> <div class="col-12"> <button class="theme-btn" type="submit">Add</button> </div> </div> </div> </form> </div> </section> </main> <%- include('./parcials/footer') %> <%- include('./parcials/scriptLinks') %> <script> const removeListItem=(btn)=>{ $(btn).parent().remove() } $(".add-list-item").click(function(){ // const targetItem = $(".list-item").last() const newList = document.createElement("div") $(newList).addClass('list-item') $(newList).html(`<input name="listItem" type="text" value=""> <button type="button" onclick="removeListItem(this)"><i class="fa-solid fa-trash"></i></button>`) // `<div class="list-item"> // <input name="listItem" type="text" value=""> // <button type="button" onclick="removeListItem(this)"><i class="fa-solid fa-trash"></i></button> // </div>` $(".list-wrapper").append(newList) // $(targetItem).after(newList) }) </script> </body> </html>