File size: 2,122 Bytes
9249145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<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>