Use <once-button> for app settings form

This commit is contained in:
Lance Edgar 2019-06-06 16:46:11 -05:00
parent f10a80333b
commit 4b6038c50c

View file

@ -99,13 +99,15 @@
</div><!-- panel-body --> </div><!-- panel-body -->
</div><! -- panel --> </div><! -- panel -->
% endfor % endfor
% endif
<div class="buttons"> <div class="buttons">
${h.submit('save', getattr(form, 'submit_label', getattr(form, 'save_label', "Submit")), class_='button is-primary')} ${h.submit('save', getattr(form, 'submit_label', getattr(form, 'save_label', "Submit")), class_='button is-primary')}
${h.link_to("Cancel", form.cancel_url, class_='cancel button{}'.format(' autodisable' if form.auto_disable_cancel else ''))} ${h.link_to("Cancel", form.cancel_url, class_='cancel button{}'.format(' autodisable' if form.auto_disable_cancel else ''))}
</div> </div>
## end of legacy (not buefy)
% endif
${h.end_form()} ${h.end_form()}
</div> </div>
@ -181,6 +183,16 @@
</div><!-- card-content --> </div><!-- card-content -->
</div><!-- card --> </div><!-- card -->
<div class="buttons">
<once-button type="is-primary"
native-type="submit"
text="${getattr(form, 'submit_label', getattr(form, 'save_label', "Submit"))}">
</once-button>
<once-button tag="a" href="${form.cancel_url}"
text="Cancel">
</once-button>
</div>
</div><!-- app-wrapper --> </div><!-- app-wrapper -->
</script> </script>