aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/_structure.less3
-rw-r--r--assets/js/lustiges-script.js18
-rw-r--r--template/assemblies/feedback.phtml1
3 files changed, 19 insertions, 3 deletions
diff --git a/assets/css/_structure.less b/assets/css/_structure.less
index 5de12e0..a465bad 100644
--- a/assets/css/_structure.less
+++ b/assets/css/_structure.less
@@ -116,7 +116,8 @@ body.e500 {
}
body.feedback {
- .feedback-thankyou {
+ .feedback-thankyou,
+ .feedback-error {
font-size: @jumbo-font-size;
text-align: center;
padding: 30px;
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js
index ef685d0..447341f 100644
--- a/assets/js/lustiges-script.js
+++ b/assets/js/lustiges-script.js
@@ -380,9 +380,23 @@ $(function() {
// feedback form
$(function() {
- $('.feedback-form').on('submit', function() {
+ $('.feedback-form').on('submit', function(e) {
+ e.preventDefault();
+ var $form = $(this);
+
$('.feedback-form').hide();
- $('.feedback-thankyou').show();
+ $.ajax({
+ url: $form.prop('action'),
+ method: $form.prop('method'),
+ data: $form.serialize(),
+ success: function() {
+ $('.feedback-thankyou').show();
+ },
+ error: function() {
+ $('.feedback-error').show();
+ }
+ });
+
});
});
diff --git a/template/assemblies/feedback.phtml b/template/assemblies/feedback.phtml
index 3c29cfb..8476dee 100644
--- a/template/assemblies/feedback.phtml
+++ b/template/assemblies/feedback.phtml
@@ -144,4 +144,5 @@
</form>
<h3 class="feedback-thankyou">Thank you!</h3>
+<h3 class="feedback-error">The Feedback seems to be also broken…</h3>
<iframe name="feedback-target" style="display: none;"></iframe>