Add support for Buefy autocomplete; several other form tweaks
at least the Edit User form should work now, for instance
This commit is contained in:
parent
d7e19865de
commit
2b6d88105c
16 changed files with 390 additions and 42 deletions
|
@ -20,16 +20,28 @@
|
|||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="render_form()">
|
||||
<%def name="render_buefy_form()">
|
||||
<br />
|
||||
% if use_buefy:
|
||||
<b-notification type="is-danger" :closable="false">
|
||||
You are about to delete the following ${model_title} and all associated data:
|
||||
</b-notification>
|
||||
% else:
|
||||
<p>You are about to delete the following ${model_title} and all associated data:</p>
|
||||
% endif
|
||||
|
||||
${parent.render_form()}
|
||||
${parent.render_buefy_form()}
|
||||
</%def>
|
||||
|
||||
<%def name="render_form_buttons()">
|
||||
<br />
|
||||
% if use_buefy:
|
||||
<b-notification type="is-danger" :closable="false">
|
||||
Are you sure about this?
|
||||
</b-notification>
|
||||
% else:
|
||||
<p>Are you sure about this?</p>
|
||||
% endif
|
||||
<br />
|
||||
|
||||
${h.form(request.current_route_url(), class_=None if form.use_buefy else 'autodisable')}
|
||||
|
@ -39,15 +51,13 @@
|
|||
<once-button tag="a" href="${form.cancel_url}"
|
||||
text="Whoops, nevermind...">
|
||||
</once-button>
|
||||
% else:
|
||||
<a class="button" href="${form.cancel_url}">Whoops, nevermind...</a>
|
||||
% endif
|
||||
% if form.use_buefy:
|
||||
<once-button type="is-primary" native-type="submit"
|
||||
<once-button type="is-primary is-danger"
|
||||
native-type="submit"
|
||||
text="Yes, please DELETE this data forever!">
|
||||
</once-button>
|
||||
% else:
|
||||
${h.submit('submit', "Yes, please DELETE this data forever!", class_='button is-primary')}
|
||||
<a class="button" href="${form.cancel_url}">Whoops, nevermind...</a>
|
||||
${h.submit('submit', "Yes, please DELETE this data forever!", class_='button is-primary')}
|
||||
% endif
|
||||
</div>
|
||||
${h.end_form()}
|
||||
|
|
|
@ -141,13 +141,12 @@
|
|||
<input type="hidden"
|
||||
name="uuids"
|
||||
:value="checkedRowUUIDs()" />
|
||||
<b-button type="is-primary"
|
||||
native-type="submit"
|
||||
icon-pack="fas"
|
||||
icon-left="object-ungroup"
|
||||
:disabled="checkedRows.length != 2">
|
||||
Merge 2 ${model_title_plural}
|
||||
</b-button>
|
||||
<once-button type="is-primary"
|
||||
native-type="submit"
|
||||
icon-left="object-ungroup"
|
||||
:disabled="checkedRows.length != 2"
|
||||
text="Merge 2 ${model_title_plural}">
|
||||
</once-button>
|
||||
% else:
|
||||
${h.hidden('uuids')}
|
||||
<button type="submit" class="button">Merge 2 ${model_title_plural}</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue