style: adds styling for zammad form

* style: adds styling for zammad form
config: added config var for enable/disable form
 (#158)
This commit is contained in:
Mojib Wali
2021-03-11 14:49:06 +01:00
committed by GitHub
parent 67c3828fc0
commit 050d7b0feb
5 changed files with 55 additions and 4 deletions

View File

@@ -8,8 +8,9 @@ $(function() {
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => { $.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
$('#feedback-form').ZammadForm({ $('#feedback-form').ZammadForm({
messageTitle: 'Feedback Form', messageTitle: 'Contact us',
messageSubmit: 'Send', showTitle: true,
messageSubmit: 'Submit',
messageThankYou: 'Thank you for your message, (#%s). We will get back to you as quickly as possible!', messageThankYou: 'Thank you for your message, (#%s). We will get back to you as quickly as possible!',
modal: true modal: true
}); });

View File

@@ -44,3 +44,46 @@ h2 {
.badges { .badges {
float: right; float: right;
} }
/*Zammad form**/
.zammad-form{
h2{
text-align: center;
}
.form-group{
label{
color: @tugrazBlack;
}
input.form-control{
height: 30px;
// width: auto;
border-radius: 0;
font-family: "Source Sans Pro";
background: @primaryLinkBackgroundInverted;
border: 1px solid rgba(34, 36, 38, 0.15);
}
textarea{
border: 1px solid rgba(34, 36, 38, 0.15);
}
}
.btn{
width: 100% !important;
cursor: pointer;
font-family: "Source Sans Pro";
min-height: 1em;
line-height: 1em;
padding: 0.78571429em 1.5em 0.78571429em;
background: @greyLight none;
border: 0;
}
.btn:hover{
background: @primaryLinkHoverBackground;
color: @primaryButton;
font-size: 1rem;
font-weight: bold;
}
}:focus{
outline: thin;
outline-style: solid;
outline-color: @outlineColor;
}

View File

@@ -65,3 +65,6 @@
// record specific // record specific
@recordVersionBackground : #f2f2f2; @recordVersionBackground : #f2f2f2;
@randomRecordsFrontpageArticle: rgba(34, 36, 38, .15); @randomRecordsFrontpageArticle: rgba(34, 36, 38, .15);
// input
@outlineColor: #85B7D9;

View File

@@ -26,6 +26,9 @@ INVENIO_THEME_TUGRAZ_ICON = "images/icon_use.png"
INVENIO_THEME_TUGRAZ_LOGIN_IMG = "images/login_logo.png" INVENIO_THEME_TUGRAZ_LOGIN_IMG = "images/login_logo.png"
"""TU Logo for forms""" """TU Logo for forms"""
INVENIO_THEME_TUGRAZ_CONTACT_FORM = False
"""Enable/Disable Contact form."""
# Invenio-theme # Invenio-theme
# ============ # ============
# See https://invenio-theme.readthedocs.io/en/latest/configuration.html # See https://invenio-theme.readthedocs.io/en/latest/configuration.html

View File

@@ -127,12 +127,13 @@
<!--contact us--> <!--contact us-->
<div class="ui segment" style="padding-bottom: 10px;"> <div class="ui segment" style="padding-bottom: 10px;">
<h4>{{_ ("Need help?")}}</h4> <h4>{{_ ("Need help?")}}</h4>
{%- if config.INVENIO_THEME_TUGRAZ_CONTACT_FORM %}
<div style="padding-bottom: 10px;"> <div style="padding-bottom: 10px;">
<a id="feedback-form" class="fluid ui button"> <a id="feedback-form" class="fluid ui button">
{{_ ("Contact us")}} {{_ ("Contact us")}}
</a> </a>
</div> </div>
{%- endif %}
<p> <p>
{{config.THEME_SITENAME}} {{_ ("prioritizes all Recent uploads.")}} {{config.THEME_SITENAME}} {{_ ("prioritizes all Recent uploads.")}}
</p> </p>