Refactor batch execution options to use colander/deform

This commit is contained in:
Lance Edgar 2018-02-11 22:37:17 -06:00
parent 2cbacd6187
commit dd04459748
12 changed files with 87 additions and 99 deletions

View file

@ -3,7 +3,7 @@
<%def name="extra_javascript()">
${parent.extra_javascript()}
${h.javascript_link(request.static_url('tailbone:static/js/tailbone.batch.js'))}
${h.javascript_link(request.static_url('tailbone:static/js/tailbone.batch.js') + '?ver={}'.format(tailbone.__version__))}
<script type="text/javascript">
var has_execution_options = ${'true' if master.has_execution_options(batch) else 'false'};
@ -84,13 +84,6 @@ ${rows_grid|n}
% if not batch.executed:
<div id="execution-options-dialog" style="display: none;">
${h.form(url('{}.execute'.format(route_prefix), uuid=batch.uuid), name='batch-execution')}
${h.csrf_token(request)}
% if master.has_execution_options(batch):
${rendered_execution_options|n}
% endif
${h.end_form()}
${execute_form.render_deform(form_kwargs={'name': 'batch-execution'}, buttons=False)|n}
</div>
% endif