Spaces:
Sleeping
Sleeping
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link rel="stylesheet" href="/static/styles.css"> | |
| <title>{{ 'Add Product' if not product else 'Edit Product' }} - Custom Wooden Nameplates</title> | |
| </head> | |
| <body> | |
| <header> | |
| <nav> | |
| <ul> | |
| <li><a href="/">Home</a></li> | |
| <li><a href="/products">Products</a></li> | |
| <li><a href="/admin">Admin Dashboard</a></li> | |
| </ul> | |
| </nav> | |
| </header> | |
| <main> | |
| <div class="container"> | |
| <h1>{{ 'Add Product' if not product else 'Edit Product' }}</h1> | |
| <form method="POST"> | |
| <div class="form-group"> | |
| <label for="name">Name</label> | |
| <input type="text" id="name" name="name" value="{{ product.name if product else '' }}" required> | |
| </div> | |
| <div class="form-group"> | |
| <label for="price">Price</label> | |
| <input type="text" id="price" name="price" value="{{ product.price if product else '' }}" required> | |
| </div> | |
| <div class="form-group"> | |
| <label for="details">Details</label> | |
| <textarea id="details" name="details" required>{{ product.details if product else '' }}</textarea> | |
| </div> | |
| <div class="form-group"> | |
| <label for="image_link">Image Link</label> | |
| <input type="text" id="image_link" name="image_link" value="{{ product.image_link if product else '' }}" required> | |
| </div> | |
| <div class="form-group"> | |
| <label for="whatsapp_link">WhatsApp Link</label> | |
| <input type="text" id="whatsapp_link" name="whatsapp_link" value="{{ product.whatsapp_link if product else '' }}" required> | |
| </div> | |
| <button type="submit">{{ 'Add' if not product else 'Update' }}</button> | |
| </form> | |
| </div> | |
| </main> | |
| </body> | |
| </html> | |