mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
zammad contact form (#156)
This commit is contained in:
@@ -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) {
|
||||
var element = document.getElementById(id);
|
||||
var isHided = element.style.display === "none";
|
||||
|
||||
@@ -69,4 +69,4 @@
|
||||
{%- include "invenio_theme/breadcrumbs.html" %}
|
||||
{%- endblock breadcrumbs %}
|
||||
#}
|
||||
</header>
|
||||
</header>
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
|
||||
{%- 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 -%}
|
||||
|
||||
{%- block page_body %}
|
||||
@@ -125,7 +129,7 @@
|
||||
<h4>{{_ ("Need help?")}} </h4>
|
||||
|
||||
<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")}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -116,4 +116,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user