Refactor Buefy forms a bit more, to copy grid pattern

i.e. each page can modify the component dynamically before it's registered
This commit is contained in:
Lance Edgar 2019-05-23 14:45:23 -05:00
parent 5bd4f84389
commit 5998941741
5 changed files with 23 additions and 12 deletions

View file

@ -1,6 +1,6 @@
## -*- coding: utf-8; -*-
<script type="text/x-template" id="buefy-form-template">
<script type="text/x-template" id="tailbone-form-template">
<div>
% if not form.readonly:
${h.form(form.action_url, id=dform.formid, method='post', enctype='multipart/form-data', **form_kwargs)}
@ -12,7 +12,7 @@
% if form.readonly or (field not in dform and field in form.readonly_fields):
<b-field horizontal
label="${form.get_label(field)}">
${form.render_field_value(field)}
${form.render_field_value(field) or h.HTML.tag('span')}
</b-field>
% elif field in dform:
@ -59,6 +59,6 @@
</script>
<div id="buefy-form-app">
<buefy-form></buefy-form>
<div id="tailbone-form-app">
<tailbone-form></tailbone-form>
</div>