2018-07-07 15:11:27 +02:00
{% extends "base.html" %}
{% block header %}
< h1 > Administration< / h1 >
{{ super() }}
{% endblock %}
{% block main %}
< section id = "modproduct" >
< h2 > Modify {{ product.name }}< / h2 >
2018-07-09 22:38:39 +02:00
< form id = "modproduct-form" method = "post" action = "/modproduct?change=update" enctype = "multipart/form-data" accept-charset = "UTF-8" >
2018-07-07 15:11:27 +02:00
< label for = "modproduct-name" > Name: < / label >
< input id = "modproduct-name" type = "text" name = "name" value = "{{ product.name }}" / > < br / >
2024-11-23 04:35:05 +01:00
< label for = "modproduct-ean" > EAN code: < / label >
< input id = "modproduct-ean" type = "text" name = "ean" value = "{{ product.ean or '' }}" / > < br / >
2018-07-07 15:11:27 +02:00
< label for = "modproduct-price-member" > Member price: < / label >
2018-07-20 14:58:22 +02:00
CHF < input id = "modproduct-price-member" type = "number" step = "0.01" name = "pricemember" value = "{{ product.price_member|chf(False) }}" / > < br / >
2018-07-07 15:11:27 +02:00
< label for = "modproduct-price-non-member" > Non-member price: < / label >
2018-07-20 14:58:22 +02:00
CHF < input id = "modproduct-price-non-member" type = "number" step = "0.01" name = "pricenonmember" value = "{{ product.price_non_member|chf(False) }}" / > < br / >
2018-07-07 15:11:27 +02:00
2021-04-07 09:36:18 +02:00
< label for = "modproduct-custom-price" > < abbr title = "When 'Custom Price' is enabled, users choose the price to pay, but at least the prices given above" > Custom Price< / abbr > : < / label >
< input id = "modproduct-custom-price" type = "checkbox" name = "custom_price" { % if product . custom_price % } checked = "checked" { % endif % } / > < br / >
2020-12-28 09:46:51 +01:00
< label for = "modproduct-stockable" > Stockable: < / label >
< input id = "modproduct-stockable" type = "checkbox" name = "stockable" { % if product . stockable % } checked = "checked" { % endif % } / > < br / >
2018-07-07 15:11:27 +02:00
< label for = "modproduct-balance" > Stock: < / label >
< input id = "modproduct-balance" name = "stock" type = "text" value = "{{ product.stock }}" / > < br / >
< label for = "modproduct-image" >
2023-03-25 22:51:57 +01:00
< img height = "150" src = "/static/upload/thumbnails/products/{{ product.id }}.png?cacheBuster={{ now }}" alt = "Image of {{ product.name }}" / >
2018-07-07 15:11:27 +02:00
< / label > < br / >
2018-09-09 23:59:06 +02:00
< input id = "modproduct-image" type = "file" name = "image" accept = "image/*" / > < br / >
2018-07-07 15:11:27 +02:00
< input id = "modproduct-productid" type = "hidden" name = "productid" value = "{{ product.id }}" / > < br / >
< input type = "submit" value = "Save changes" >
< / form >
2018-07-09 22:38:39 +02:00
< form id = "modproduct-delproduct-form" method = "post" action = "/modproduct?change=del" accept-charset = "UTF-8" >
< input id = "modproduct-delproduct-productid" type = "hidden" name = "productid" value = "{{ product.id }}" / > < br / >
2018-07-07 15:11:27 +02:00
< input type = "submit" value = "Delete product" / >
< / form >
< / section >
{{ super() }}
{% endblock %}
2024-11-25 23:29:30 +01:00
{% block eanwebsocket %}
function (e) {
let eaninput = document.getElementById("modproduct-ean");
eaninput.value = e.data;
eaninput.select();
eaninput.scrollIntoView();
}
{% endblock %}