disinclined.org
/
git
/
dylansserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More cleanup & formatting
[dylansserver.git]
/
includes
/
ajax.js
diff --git
a/includes/ajax.js
b/includes/ajax.js
index
2bc9cce
..
bc51be3
100644
(file)
--- a/
includes/ajax.js
+++ b/
includes/ajax.js
@@
-15,6
+15,7
@@
$(document).ready(function() {
var name = $("#comment_name").val();
var email = $("#comment_email").val();
var text = $("#comment_text").val();
var name = $("#comment_name").val();
var email = $("#comment_email").val();
var text = $("#comment_text").val();
+ if (name == '') { name = "anon" }
var comment_data = { "captcha" : "passed",
"name" : name,
"email" : email,
var comment_data = { "captcha" : "passed",
"name" : name,
"email" : email,
@@
-35,7
+36,8
@@
$(document).ready(function() {
}
});
} else {
}
});
} else {
- console.log('reCAPTCHA said you\'re not human.');
+ var error = "<span style='font-weight:bold;font-family:sans-serif;color:red;margin-top:15px;'>reCAPTCHA said you're not human</span>";
+ $('#comment').append(error);
}
},
error: function() {
}
},
error: function() {
@@
-46,7
+48,8
@@
$(document).ready(function() {
}
});
} else {
}
});
} else {
- console.log('but you didn\'t write anything!');
+ var error = "<span style='font-weight:bold;font-family:sans-serif;color:red;margin-top:15px;'>but you didn't write anything!<br></span>";
+ $('#submit').before(error);
}
return false;
});
}
return false;
});