Tweak fields for product view
This commit is contained in:
parent
ee6d3195c5
commit
4498bc001f
|
@ -263,24 +263,24 @@ class ProductsView(MasterView):
|
|||
return price.product
|
||||
raise httpexceptions.HTTPNotFound()
|
||||
|
||||
def configure_fieldset(self, fs):
|
||||
|
||||
fs.upc.set(renderer=forms.renderers.GPCFieldRenderer)
|
||||
fs.brand.set(options=[])
|
||||
fs.unit_of_measure.set(renderer=forms.renderers.EnumFieldRenderer(enum.UNIT_OF_MEASURE))
|
||||
def _preconfigure_fieldset(self, fs):
|
||||
fs.upc.set(label="UPC", renderer=forms.renderers.GPCFieldRenderer)
|
||||
fs.brand.set(renderer=forms.renderers.BrandFieldRenderer, options=[])
|
||||
fs.unit_of_measure.set(label="Unit of Measure",
|
||||
renderer=forms.renderers.EnumFieldRenderer(self.enum.UNIT_OF_MEASURE))
|
||||
fs.regular_price.set(renderer=forms.renderers.PriceFieldRenderer)
|
||||
fs.current_price.set(renderer=forms.renderers.PriceFieldRenderer)
|
||||
|
||||
fs.append(fa.Field('current_price_ends', type=fa.types.DateTime,
|
||||
value=lambda p: p.current_price.ends if p.current_price else None))
|
||||
|
||||
def configure_fieldset(self, fs):
|
||||
fs.configure(
|
||||
include=[
|
||||
fs.upc.label("UPC"),
|
||||
fs.brand.with_renderer(forms.renderers.BrandFieldRenderer),
|
||||
fs.upc,
|
||||
fs.brand,
|
||||
fs.description,
|
||||
fs.unit_size,
|
||||
fs.unit_of_measure.label("Unit of Measure"),
|
||||
fs.unit_of_measure,
|
||||
fs.size,
|
||||
fs.weighed,
|
||||
fs.case_pack,
|
||||
|
|
Loading…
Reference in a new issue