Refactor several "field grids" per Buefy theme
e.g. the Users field when viewing a Role, and Vendor Sources panel when viewing a Product
This commit is contained in:
parent
9fe1d4c596
commit
3ece3303db
9 changed files with 299 additions and 17 deletions
|
@ -26,4 +26,29 @@
|
|||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="render_buefy_form()">
|
||||
<div class="form">
|
||||
<tailbone-form @detach-person="detachPerson">
|
||||
</tailbone-form>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="modify_this_page_vars()">
|
||||
${parent.modify_this_page_vars()}
|
||||
<script type="text/javascript">
|
||||
|
||||
${form.component_studly}Data.peopleData = ${json.dumps(people_data)|n}
|
||||
|
||||
ThisPage.methods.detachPerson = function(url) {
|
||||
## TODO: this should require POST, but we will add that once
|
||||
## we can assume a Buefy theme is present, to avoid having to
|
||||
## implement the logic in old jquery...
|
||||
if (confirm("Are you sure you want to detach this person from this customer account?")) {
|
||||
location.href = url
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue