Skip to content
Snippets Groups Projects
Verified Commit 186c111c authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Add support for an additional button and a redirect on success in progress template

parent 7d022176
No related branches found
No related tags found
1 merge request!464Resolve "Support PDF generation via a headless Chromium running in the background using celery"
......@@ -47,6 +47,10 @@ function customSuccess(progressBarElement, progressBarMessageElement) {
$("#result-icon").text("check_circle");
$("#result-text").text(OPTIONS.success);
$("#result-box").show();
const redirect = "redirect_on_success" in OPTIONS;
if (redirect) {
window.location.href = OPTIONS.redirect_on_success;
}
}
function customError(progressBarElement, progressBarMessageElement) {
......
......@@ -30,7 +30,7 @@
</p>
</div>
</noscript>
<div id="messages"></div>
<div id="result-box" style="display: none;">
......@@ -46,6 +46,12 @@
<i class="material-icons left">arrow_back</i>
{% trans "Go back" %}
</a>
{% if additional_button %}
<a class="btn waves-effect waves-light" href="{{ additional_button.href }}">
<i class="material-icons left">{{ additional_button.icon|default:"" }}</i>
{{ additional_button.caption }}
</a>
{% endif %}
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment