Spaces:
Sleeping
Sleeping
form improvement order
Browse files- testnavbar.py +17 -7
testnavbar.py
CHANGED
|
@@ -126,15 +126,25 @@ def product_detail(product_name: str):
|
|
| 126 |
render_md(example_product_description.format(product_name=product_name))
|
| 127 |
),
|
| 128 |
Div(
|
| 129 |
-
H3("Order
|
| 130 |
# Form automatically has a class of 'space-y-3' for a margin between each child.
|
| 131 |
Form(
|
| 132 |
-
#
|
| 133 |
-
LabelInput("
|
| 134 |
-
|
| 135 |
-
LabelInput("
|
| 136 |
-
|
| 137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
Button("Add to order", cls=(ButtonT.primary, "w-full mt-4")),
|
| 139 |
Button("Continue shopping",
|
| 140 |
cls=(ButtonT.secondary, "w-full mt-2"),
|
|
|
|
| 126 |
render_md(example_product_description.format(product_name=product_name))
|
| 127 |
),
|
| 128 |
Div(
|
| 129 |
+
H3("Order", cls="text-lg font-semibold mb-3"),
|
| 130 |
# Form automatically has a class of 'space-y-3' for a margin between each child.
|
| 131 |
Form(
|
| 132 |
+
# Product info (read-only)
|
| 133 |
+
LabelInput("Product", id="name", value=product_name, readonly=True,
|
| 134 |
+
cls="bg-gray-100 cursor-not-allowed"),
|
| 135 |
+
LabelInput("Price", id="price", value=price, readonly=True,
|
| 136 |
+
cls="bg-gray-100 cursor-not-allowed"),
|
| 137 |
+
|
| 138 |
+
# Order details
|
| 139 |
+
LabelInput("Quantity", id="quantity", placeholder="1"),
|
| 140 |
+
|
| 141 |
+
# Customer info
|
| 142 |
+
LabelInput("Email", id="email", placeholder="accountemail@example.com"),
|
| 143 |
+
|
| 144 |
+
# Payment section
|
| 145 |
+
Div(PaymentMethod, cls="space-y-4 mt-4"),
|
| 146 |
+
|
| 147 |
+
# Actions
|
| 148 |
Button("Add to order", cls=(ButtonT.primary, "w-full mt-4")),
|
| 149 |
Button("Continue shopping",
|
| 150 |
cls=(ButtonT.secondary, "w-full mt-2"),
|