-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core/api): new submission file download endpoint (#855)
- Loading branch information
1 parent
dd8370a
commit b349cbd
Showing
4 changed files
with
42 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends '@EMSCH/template/base/base.html.twig' %} | ||
|
||
{% block headtitle %}SSO Test{% endblock %} | ||
|
||
{% block body %} | ||
<div class="d-flex justify-content-center align-items-center mt-5"> | ||
<div class="w-25"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
SSO Test | ||
</div> | ||
<div class="card-body"> | ||
<p>Welcome {{ app.user.userIdentifier }}</p> | ||
<a href="{{ path('emsch_logout') }}" class="btn btn-primary">Logout</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,19 +38,15 @@ | |
{{- message|json_encode|raw -}} | ||
{% endblock http_admin_api_form_request_body %} | ||
|
||
{% block http_admin_api_form_handle_response_extra %} | ||
{%- set extra = { | ||
'uid': (response.getHttpResponseContentJSON.submission_id) | ||
} -%} | ||
{{- extra|json_encode|raw -}} | ||
{% endblock http_admin_api_form_handle_response_extra %} | ||
|
||
{% block email_endpoint %} | ||
{{- "[email protected]" -}} | ||
{% endblock email_endpoint %} | ||
|
||
{% block email_message %} | ||
{% apply spaceless %} | ||
{% set skeletonUrl = app.request.server.all['SKELETON_URL']|default('https://demo-admin.elasticms.eu') %} | ||
{% set submission = responses[0].getHttpResponseContentJSON.submission %} | ||
|
||
{% set data = [] %} | ||
{% set elements = config.elements %} | ||
{% for name, value in formData.raw|filter((v, k) => k != 'files') %} | ||
|
@@ -70,8 +66,13 @@ | |
{% if files|length > 0 %} | ||
<p>Files:</p> | ||
<ul> | ||
{% for file in files %} | ||
<li>{{ file.originalName }}</li> | ||
{% for index, file in files %} | ||
{% set submissionFile = submission.files[index] %} | ||
<li> | ||
<a href="{{ "#{skeletonUrl}/form/#{submission.id}/attachment/#{submissionFile.id}" }}"> | ||
{{ file.originalName }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|