Fix "execute results" batch template logic for Buefy themes

This commit is contained in:
Lance Edgar 2020-08-23 11:23:22 -05:00
parent 5af26a57f6
commit 026dc6309c

View file

@ -97,6 +97,8 @@
% if use_buefy:
<b-button type="is-primary"
@click="executeResults()"
icon-pack="fas"
icon-left="arrow-circle-right"
:disabled="!total">
Execute Results
</b-button>
@ -114,7 +116,11 @@
Please be advised, you are about to execute {{ total }} batches!
</p>
<br />
<tailbone-form ref="executeResultsForm"></tailbone-form>
<div class="form-wrapper">
<div class="form">
<${execute_form.component} ref="executeResultsForm"></${execute_form.component}>
</div>
</div>
</section>
<footer class="modal-card-foot">
@ -123,7 +129,8 @@
</b-button>
<once-button type="is-primary"
@click="submitExecuteResults()"
text="Execute">
icon-left="arrow-circle-right"
:text="'Execute ' + total + ' Batches'">
</once-button>
</footer>
@ -141,8 +148,8 @@
% if master.results_executable and master.has_perm('execute_multiple'):
<script type="text/javascript">
TailboneForm.methods.submit = function() {
this.$refs.actualForm.submit()
${execute_form.component_studly}.methods.submit = function() {
this.$refs.actualExecuteForm.submit()
}
TailboneGridData.hasExecutionOptions = ${json.dumps(master.has_execution_options(batch))|n}
@ -181,9 +188,9 @@
% if master.results_executable and master.has_perm('execute_multiple'):
<script type="text/javascript">
TailboneForm.data = function() { return TailboneFormData }
${execute_form.component_studly}.data = function() { return ${execute_form.component_studly}Data }
Vue.component('tailbone-form', TailboneForm)
Vue.component('${execute_form.component}', ${execute_form.component_studly})
</script>
% endif
@ -192,7 +199,7 @@
<%def name="render_this_page_template()">
${parent.render_this_page_template()}
% if master.results_executable and master.has_perm('execute_multiple'):
${execute_form.render_deform(form_kwargs={'ref': 'actualForm'}, buttons=False)|n}
${execute_form.render_deform(form_kwargs={'ref': 'actualExecuteForm'}, buttons=False)|n}
% endif
</%def>