zammad contact form (#156)

This commit is contained in:
rekt-hard
2021-03-09 09:04:32 +01:00
committed by GitHub
parent d17b83b67f
commit baa7d290c7
4 changed files with 25 additions and 3 deletions

View File

@@ -1,3 +1,21 @@
import $ from 'jquery';
$(function() {
let scriptNode = document.createElement("hidden"); //needed for zammad script
scriptNode.id = "zammad_form_script";
scriptNode.src = "https://ub-support.tugraz.at/assets/form/form.js";
document.head.appendChild(scriptNode);
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
$('#feedback-form').ZammadForm({
messageTitle: 'Feedback Form',
messageSubmit: 'Send',
messageThankYou: 'Thank you for your message, (#%s). We will get back to you as quickly as possible!',
modal: true
});
});
});
export function toggleVisibility(id) { export function toggleVisibility(id) {
var element = document.getElementById(id); var element = document.getElementById(id);
var isHided = element.style.display === "none"; var isHided = element.style.display === "none";

View File

@@ -69,4 +69,4 @@
{%- include "invenio_theme/breadcrumbs.html" %} {%- include "invenio_theme/breadcrumbs.html" %}
{%- endblock breadcrumbs %} {%- endblock breadcrumbs %}
#} #}
</header> </header>

View File

@@ -9,6 +9,10 @@
{%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %} {%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %}
{%- block javascript %}
{{ webpack['invenio-theme-tugraz-js.js'] }}
{%- endblock javascript %}
{%- from "invenio_theme_tugraz/macros/authors.html" import creators -%} {%- from "invenio_theme_tugraz/macros/authors.html" import creators -%}
{%- block page_body %} {%- block page_body %}
@@ -125,7 +129,7 @@
<h4>{{_ ("Need help?")}} </h4> <h4>{{_ ("Need help?")}} </h4>
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a href="{{ url_for('invenio_theme_tugraz.index')}}" class="fluid ui button"> <a id="feedback-form" class="fluid ui button">
{{_ ("Contact us")}} {{_ ("Contact us")}}
</a> </a>
</div> </div>

View File

@@ -116,4 +116,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>