send contact message
This commit is contained in:
parent
f1ba3fbd34
commit
cfbc90b50b
2 changed files with 36 additions and 3 deletions
|
|
@ -96,6 +96,12 @@ oml.ui.contactForm = function() {
|
|||
subject: data.subject,
|
||||
message: data.message,
|
||||
}, function(result) {
|
||||
var title = Ox._('Message Sent'),
|
||||
content = Ox._('Thanks for your message!<br/><br/>We will get back to you as soon as possible.');
|
||||
if (result.error) {
|
||||
title = Ox._('Error');
|
||||
content = Ox._('Sorry. There was an error sending your message. Please try again later.');
|
||||
}
|
||||
var $dialog = oml.ui.iconDialog({
|
||||
buttons: [
|
||||
Ox.Button({
|
||||
|
|
@ -104,13 +110,15 @@ oml.ui.contactForm = function() {
|
|||
}).bindEvent({
|
||||
click: function() {
|
||||
$dialog.close();
|
||||
$form.values({subject: '', message: ''});
|
||||
if (!result.error) {
|
||||
$form.values({subject: '', message: ''});
|
||||
}
|
||||
}
|
||||
})
|
||||
],
|
||||
content: Ox._('Thanks for your message!<br/><br/>We will get back to you as soon as possible.'),
|
||||
content: content,
|
||||
keys: {enter: 'close', escape: 'close'},
|
||||
title: Ox._('Message Sent')
|
||||
title: title
|
||||
})
|
||||
.open();
|
||||
$sendButton.options({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue