Only include "export invoice" logic if user has perm
This commit is contained in:
parent
75e720d679
commit
dda03fd655
|
@ -3,9 +3,10 @@
|
||||||
|
|
||||||
<%def name="grid_tools()">
|
<%def name="grid_tools()">
|
||||||
${parent.grid_tools()}
|
${parent.grid_tools()}
|
||||||
|
|
||||||
|
% if master.has_perm('export'):
|
||||||
${h.form(url('{}.export'.format(route_prefix)), **{'@submit': 'exportingInvoices = true'})}
|
${h.form(url('{}.export'.format(route_prefix)), **{'@submit': 'exportingInvoices = true'})}
|
||||||
${h.csrf_token(request)}
|
${h.csrf_token(request)}
|
||||||
% if master.has_perm('export'):
|
|
||||||
<b-button type="is-primary"
|
<b-button type="is-primary"
|
||||||
native-type="submit"
|
native-type="submit"
|
||||||
icon-pack="fas"
|
icon-pack="fas"
|
||||||
|
@ -13,12 +14,13 @@
|
||||||
:disabled="exportingInvoices || !exportingInvoicesCount">
|
:disabled="exportingInvoices || !exportingInvoicesCount">
|
||||||
{{ exportingInvoices ? "Working, please wait..." : `Export ${'$'}{this.exportingInvoicesCount} Invoices` }}
|
{{ exportingInvoices ? "Working, please wait..." : `Export ${'$'}{this.exportingInvoicesCount} Invoices` }}
|
||||||
</b-button>
|
</b-button>
|
||||||
% endif
|
|
||||||
${h.end_form()}
|
${h.end_form()}
|
||||||
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="modify_this_page_vars()">
|
<%def name="modify_this_page_vars()">
|
||||||
${parent.modify_this_page_vars()}
|
${parent.modify_this_page_vars()}
|
||||||
|
% if master.has_perm('export'):
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
${grid.component_studly}Data.exportingInvoices = false
|
${grid.component_studly}Data.exportingInvoices = false
|
||||||
|
@ -82,6 +84,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue