mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 13:11: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) {
|
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";
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user