Improved wording.
This commit is contained in:
parent
6cfaabfc40
commit
5442eb5762
3 changed files with 17 additions and 10 deletions
|
@ -21,10 +21,13 @@
|
||||||
<td><label><input type="text" name="title" value="<%- @T('Feedback Form') %>" style="display: inline; width: auto;"/> <%- @T('Title of the form.') %></label></td>
|
<td><label><input type="text" name="title" value="<%- @T('Feedback Form') %>" style="display: inline; width: auto;"/> <%- @T('Title of the form.') %></label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label><input type="text" name="submit" value="<%- @T('Submit') %>" style="display: inline; width: auto;"/> <%- @T('Name of submit button.') %></label></td>
|
<td><label><input type="text" name="messageTitle" value="" style="display: inline; width: auto;"/> <%- @T('Form headline.') %></label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label><input type="text" name="thank_you" value="<%- @T('Thank you for your inquiry!') %>" style="display: inline; width: auto;"/> <%- @T('Message after sending form.') %></label></td>
|
<td><label><input type="text" name="messageSubmit" value="<%- @T('Submit') %>" style="display: inline; width: auto;"/> <%- @T('Name of form submit button.') %></label></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label><input type="text" name="messageThankYou" value="<%- @T('Thank you for your inquiry!') %>" style="display: inline; width: auto;"/> <%- @T('Message after sending form.') %></label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label><input type="checkbox" name="debug" value="true"/> <%- @T('Enable debugging for implementation.') %></label></td>
|
<td><label><input type="checkbox" name="debug" value="true"/> <%- @T('Enable debugging for implementation.') %></label></td>
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.zammad-form .js-thankyou {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
debug: false,
|
debug: false,
|
||||||
noCSS: false,
|
noCSS: false,
|
||||||
title: 'Zammad Form',
|
title: 'Zammad Form',
|
||||||
submit: 'Submit',
|
messageHeadline: '',
|
||||||
thank_you: 'Thank you for your inquiry!',
|
messageSubmit: 'Submit',
|
||||||
|
messageThankYou: 'Thank you for your inquiry!',
|
||||||
};
|
};
|
||||||
|
|
||||||
function Plugin( element, options ) {
|
function Plugin( element, options ) {
|
||||||
|
@ -132,9 +133,6 @@
|
||||||
// ticket has been created
|
// ticket has been created
|
||||||
_this.thanks()
|
_this.thanks()
|
||||||
|
|
||||||
// rerender after 6 seconds
|
|
||||||
_this.render()
|
|
||||||
|
|
||||||
}).fail(function() {
|
}).fail(function() {
|
||||||
alert('Faild to submit form!')
|
alert('Faild to submit form!')
|
||||||
});
|
});
|
||||||
|
@ -182,7 +180,9 @@
|
||||||
|
|
||||||
var $element = $(element)
|
var $element = $(element)
|
||||||
var $form = $element.find('form')
|
var $form = $element.find('form')
|
||||||
$form.append('<h2>' + this.options.title + '</h2>')
|
if (this.options.messageHeadline && this.options.messageHeadline != '') {
|
||||||
|
$form.append('<h2>' + this.options.messageHeadline + '</h2>')
|
||||||
|
}
|
||||||
$.each(this.attributes, function( index, value ) {
|
$.each(this.attributes, function( index, value ) {
|
||||||
var item = $('<div class="form-group"><label>' + value.display + '</label></div>')
|
var item = $('<div class="form-group"><label>' + value.display + '</label></div>')
|
||||||
if (value.tag == 'input') {
|
if (value.tag == 'input') {
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
}
|
}
|
||||||
$form.append(item)
|
$form.append(item)
|
||||||
})
|
})
|
||||||
$form.append('<button type="submit" class="btn">' + this.options.submit + '</button')
|
$form.append('<button type="submit" class="btn">' + this.options.messageSubmit + '</button')
|
||||||
|
|
||||||
this.$modal = $element
|
this.$modal = $element
|
||||||
this.$form = $form
|
this.$form = $form
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
|
|
||||||
// thanks
|
// thanks
|
||||||
Plugin.prototype.thanks = function(e) {
|
Plugin.prototype.thanks = function(e) {
|
||||||
var thanks = $('<div>Thank you for your inquery!</div>')
|
var thanks = $('<div class="js-thankyou">' + this.options.messageThankYou + '</div>')
|
||||||
this.$form.html(thanks)
|
this.$form.html(thanks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue