aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/setup.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/setup.js')
-rw-r--r--public/js/setup.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/public/js/setup.js b/public/js/setup.js
index 357b908e..9552e715 100644
--- a/public/js/setup.js
+++ b/public/js/setup.js
@@ -35,11 +35,18 @@
return $("#symbol option[value='bitstamp']").attr('selected', 'selected');
}
}).change();
- $('#address').change(function() {
+ $('#title').blur(function() {
+ if ($(this).val() === '') {
+ return $(this).parent().addClass('has-error');
+ } else {
+ return $(this).parent().removeClass('has-error');
+ }
+ });
+ $('#address').blur(function() {
if (check_address($(this).val())) {
- return $(this).css('color', 'black');
+ return $(this).parent().removeClass('has-error');
} else {
- return $(this).css('color', 'red');
+ return $(this).parent().addClass('has-error');
}
});
$('#confirm').blur(function() {
@@ -52,7 +59,9 @@
}
});
$('#setup').submit(function() {
- if ($('.has-error').length()) {
+ $('.form-control').blur();
+ if ($('.has-error').length > 0) {
+ $('.has-error').effect('shake', 500);
return false;
}
});