Development
This commit is contained in:
parent
04c039e012
commit
2cf7da37b8
1 changed files with 3 additions and 6 deletions
|
|
@ -1244,15 +1244,12 @@ def _render_item(item, tokens, inherited_req=None):
|
|||
field_inner = inp
|
||||
|
||||
form_rows += (
|
||||
f'<div class="form-group">'
|
||||
f'<label class="form-label">{f_label}</label>'
|
||||
f'<div class="record-editor-field-row">'
|
||||
f'<span class="record-editor-field-label">{f_label}:</span>'
|
||||
f'{field_inner}'
|
||||
f'</div>'
|
||||
)
|
||||
|
||||
n = len(fields)
|
||||
grid_class = f'form-row-{n}' if n in (2, 3, 4) else 'form-row-3'
|
||||
|
||||
return (
|
||||
f'<div class="form-group record-editor" data-name="{name}" data-empty-message="{empty}">'
|
||||
f'<div class="record-editor-body">'
|
||||
|
|
@ -1268,7 +1265,7 @@ def _render_item(item, tokens, inherited_req=None):
|
|||
f'</div>'
|
||||
f'<div class="record-editor-form">'
|
||||
f'<label class="form-label record-editor-label">{label}</label>'
|
||||
f'<div class="{grid_class}">{form_rows}</div>'
|
||||
f'{form_rows}'
|
||||
f'<div style="margin-top:0.5rem">'
|
||||
f'<button type="button" class="btn btn-secondary btn-sm record-editor-add-btn">Add</button>'
|
||||
f'<button type="button" class="btn btn-ghost btn-sm record-editor-cancel-btn hidden" style="margin-left:0.5rem">Cancel</button>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue