+
+
+<% end %>
+
<% form_tag( url_for(@page.view_url.merge({:only_path => true})), { :class => 'comment_form' } ) do %>
<%= hidden_field_tag(:confirm, 'false') %>
@@ -32,15 +72,16 @@
<%= _('If you are a registered user, you can login and be automatically recognized.') %>
+ <%= hidden_field_tag(:recaptcha_response_field, nil, :id => nil) %>
+ <%= hidden_field_tag(:recaptcha_challenge_field, nil, :id => nil) %>
+
<% end %>
- <%= required labelled_form_field(_('Title'), text_field(:comment, :title)) %>
+ <%= labelled_form_field(_('Title'), text_field(:comment, :title)) %>
<%= required labelled_form_field(_('Enter your comment'), text_area(:comment, :body, :rows => 5)) %>
- <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true) unless logged_in? %>
-
<% button_bar do %>
- <%= submit_button('add', _('Post comment'), :onclick => "this.form.confirm.value = 'true'; this.disabled = true; this.form.submit(); return true;") %>
+ <%= submit_button('add', _('Post comment'), :onclick => "submit_comment_form(this); return false") %>
<%= button_to_function :cancel, _('Cancel'), "f=jQuery(this).parents('.post_comment_box'); f.removeClass('opened'); f.addClass('closed'); return false" %>
<% end %>
<% end %>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index a134af2..c368626 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -662,7 +662,6 @@ function add_comment_reply_form(button, comment_id) {
var f = container.find('.comment_form');
if (f.length == 0) {
f = jQuery('#page-comment-form .comment_form').clone();
- f.find('#dynamic_recaptcha').remove();
f.find('.fieldWithErrors').map(function() { jQuery(this).replaceWith(jQuery(this).contents()); });
f.prepend('');
container.append(f);
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index a1957e3..e3f8df9 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -6173,31 +6173,6 @@ h1#agenda-title {
/* Captcha */
-.comment_reply #recaptcha_area {
- margin-bottom: 3px !important;
-}
-
-.comment_reply .recaptchatable tr td + td + td {
- display: none !important;
-}
-
-.comment_reply .recaptcha-container {
- width: 100%;
- overflow: hidden;
-}
-
-.comment_reply .recaptcha-container:hover {
- overflow: visible;
-}
-
-.comment_reply .recaptcha-container tr:hover td {
- background: transparent;
-}
-
-.comment_reply .recaptcha_image_cell {
- background: transparent !important;
-}
-
/* Colorbox */
#cboxClose {
diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb
index 526f250..884353f 100644
--- a/test/unit/comment_test.rb
+++ b/test/unit/comment_test.rb
@@ -5,8 +5,8 @@ class CommentTest < Test::Unit::TestCase
def setup
end
- should 'have a name and require it' do
- assert_mandatory(Comment.new, :title)
+ should 'have a name but not require it' do
+ assert_optional(Comment.new, :title)
end
should 'have a body and require it' do
@@ -197,7 +197,6 @@ class CommentTest < Test::Unit::TestCase
comment.valid?
assert comment.errors.invalid?(:name)
- assert comment.errors.invalid?(:title)
assert comment.errors.invalid?(:body)
end
--
libgit2 0.21.2