Modified: trunk/app/controllers/networks_controller.rb (2901 => 2902)
--- trunk/app/controllers/networks_controller.rb 2012-01-17 10:14:19 UTC (rev 2901)
+++ trunk/app/controllers/networks_controller.rb 2012-01-17 13:11:27 UTC (rev 2902)
@@ -90,7 +90,7 @@
# POST /networks/1;membership_invite_external
def membership_invite_external
# first of all, check that captcha was entered correctly
- if !captcha_valid?(params[:invitations][:captcha_id], params[:invitations][:captcha_validation])
+ if Conf.recaptcha_enable && !verify_recaptcha(:private_key => Conf.recaptcha_private)
respond_to do |format|
flash.now[:error] = 'Verification text was not entered correctly - your invitations have not been sent.'
format.html { render :action ="" 'invite' }
Modified: trunk/app/views/networks/invite.rhtml (2901 => 2902)
--- trunk/app/views/networks/invite.rhtml 2012-01-17 10:14:19 UTC (rev 2901)
+++ trunk/app/views/networks/invite.rhtml 2012-01-17 13:11:27 UTC (rev 2902)
@@ -71,19 +71,12 @@
<% msg_text_val = ((params[:invitations].nil? || params[:invitations][:msg_text].nil?) ? "" : params[:invitations][:msg_text]) %>
<%= text_area_tag "invitations[msg_text]", msg_text_val, :rows => 4, :style => "width: 500px" -%><br/>
- <table style="margin-top: 1.5em;">
- <tr>
- <td>
- <% c = prepare_captcha :type => :image -%>
- <%= captcha_image_tag c -%>
- </td>
- <td style="vertical-align: middle;">
- <%= captcha_hidden_field c, 'invitations' -%>
- <%= captcha_label 'invitations', 'Type in the text from the image on the left:' -%><br/>
- <%= captcha_text_field 'invitations', :size => 40 -%>
- </td>
- </tr>
- </table>
+ <% if Conf.recaptcha_enable -%>
+ <center>
+ <%= recaptcha_tags(:public_key => Conf.recaptcha_public) -%>
+ </center>
+ <% end -%>
+
</td>
</tr>
<tr>