fix #1443 (disable send button while sending contact message)

This commit is contained in:
rolux 2013-03-25 20:30:53 +05:30
parent f9f1a119a2
commit 977abe6dc4

View file

@ -98,6 +98,10 @@ pandora.ui.contactForm = function() {
.bindEvent({ .bindEvent({
click: function() { click: function() {
var data = $form.values(); var data = $form.values();
$sendButton.options({
disabled: true,
title: 'Sending Message...'
});
pandora.api.contact({ pandora.api.contact({
name: data.name, name: data.name,
email: data.email, email: data.email,
@ -122,6 +126,10 @@ pandora.ui.contactForm = function() {
title: 'Message Sent' title: 'Message Sent'
}) })
.open(); .open();
$sendButton.options({
disabled: false,
title: 'Send Message'
});
}); });
} }