From 5442eb5762a8973d6ce50af1719703ac630b10b7 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 10 Aug 2015 11:11:27 +0200 Subject: [PATCH] Improved wording. --- .../javascripts/app/views/channel/form.jst.eco | 7 +++++-- public/assets/form/form.css | 4 ++++ public/assets/form/form.js | 16 ++++++++-------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/app/views/channel/form.jst.eco b/app/assets/javascripts/app/views/channel/form.jst.eco index 9d9aab686..a51e014b5 100644 --- a/app/assets/javascripts/app/views/channel/form.jst.eco +++ b/app/assets/javascripts/app/views/channel/form.jst.eco @@ -21,10 +21,13 @@ - + - + + + + diff --git a/public/assets/form/form.css b/public/assets/form/form.css index a25ec6743..042d040d7 100644 --- a/public/assets/form/form.css +++ b/public/assets/form/form.css @@ -22,6 +22,10 @@ color: #a94442; } +.zammad-form .js-thankyou { + text-align: center; +} + .modal { position: fixed; left: 0; diff --git a/public/assets/form/form.js b/public/assets/form/form.js index 51f76136b..fd9cc7d1d 100644 --- a/public/assets/form/form.js +++ b/public/assets/form/form.js @@ -9,8 +9,9 @@ debug: false, noCSS: false, title: 'Zammad Form', - submit: 'Submit', - thank_you: 'Thank you for your inquiry!', + messageHeadline: '', + messageSubmit: 'Submit', + messageThankYou: 'Thank you for your inquiry!', }; function Plugin( element, options ) { @@ -132,9 +133,6 @@ // ticket has been created _this.thanks() - // rerender after 6 seconds - _this.render() - }).fail(function() { alert('Faild to submit form!') }); @@ -182,7 +180,9 @@ var $element = $(element) var $form = $element.find('form') - $form.append('

' + this.options.title + '

') + if (this.options.messageHeadline && this.options.messageHeadline != '') { + $form.append('

' + this.options.messageHeadline + '

') + } $.each(this.attributes, function( index, value ) { var item = $('
') if (value.tag == 'input') { @@ -193,7 +193,7 @@ } $form.append(item) }) - $form.append('