Misc. improvements for ordering batches, purchases

also we now show handler's description when executing batch
This commit is contained in:
Lance Edgar 2021-01-30 13:17:08 -06:00
parent e1e3301fc1
commit fac00e6ecd
8 changed files with 77 additions and 34 deletions

View file

@ -1,6 +1,7 @@
## -*- coding: utf-8; -*-
<script type="text/x-template" id="${form.component}-template">
<div>
% if not form.readonly:
${h.form(form.action_url, id=dform.formid, method='post', enctype='multipart/form-data', **form_kwargs)}
@ -18,19 +19,24 @@
% elif field in dform:
<% field = dform[field] %>
<b-field horizontal
label="${form.get_label(field.name)}"
## TODO: is this class="file" really needed?
% if isinstance(field.schema.typ, deform.FileData):
class="file"
% endif
% if field.error:
type="is-danger"
:message='${form.messages_json(field.error.messages())|n}'
% endif
>
${field.serialize(use_buefy=True)|n}
</b-field>
% if form.field_visible(field.name):
<b-field horizontal
label="${form.get_label(field.name)}"
## TODO: is this class="file" really needed?
% if isinstance(field.schema.typ, deform.FileData):
class="file"
% endif
% if field.error:
type="is-danger"
:message='${form.messages_json(field.error.messages())|n}'
% endif
>
${field.serialize(use_buefy=True)|n}
</b-field>
% else:
## hidden field
${field.serialize()|n}
% endif
% endif
% endfor