diff --git a/controllers/mpog_software_plugin_controller.rb b/controllers/mpog_software_plugin_controller.rb
index 6a2b06c..ba4059e 100644
--- a/controllers/mpog_software_plugin_controller.rb
+++ b/controllers/mpog_software_plugin_controller.rb
@@ -47,20 +47,16 @@ class MpogSoftwarePluginController < ApplicationController
end
def new_institution
- if request.xhr? and !params[:community].nil? and !params[:institution].nil? and !params[:recaptcha_response_field].nil?
+ if request.xhr? and !params[:community].nil? and !params[:institution].nil?
response_message = {}
institution = private_create_institution
- response_message = if verify_recaptcha(:model=> institution, :message => _('Please type the word correctly'))
- if institution.errors.full_messages.empty? and institution.valid? and institution.save
+ response_message = if institution.errors.full_messages.empty? and institution.valid? and institution.save
{:success => true, :message => _("Institution successful created!"), :institution_data=>{:name=>institution.name, :id=>institution.id}}
else
{:success => false, :message => _("Institution could not be created!"), :errors => institution.errors.full_messages}
end
- else
- {:success => false, :message=>_('Please type the image text correctly'), :errors=>[]}
- end
render :json => response_message.to_json
else
diff --git a/public/mpog-institution-validations.js b/public/mpog-institution-validations.js
index 7de3630..03b9482 100644
--- a/public/mpog-institution-validations.js
+++ b/public/mpog-institution-validations.js
@@ -65,9 +65,6 @@
type: get_selected_institution_type(),
acronym : jQuery("#institutions_acronym").val(),
},
- authenticity_token : jQuery("input[name='authenticity_token']").val(),
- recaptcha_response_field : jQuery('#recaptcha_response_field').val(),
- recaptcha_challenge_field : jQuery('#recaptcha_challenge_field').val()
}
}
diff --git a/views/mpog_software_plugin/create_institution.html.erb b/views/mpog_software_plugin/create_institution.html.erb
index 4167fe8..c6e8cca 100644
--- a/views/mpog_software_plugin/create_institution.html.erb
+++ b/views/mpog_software_plugin/create_institution.html.erb
@@ -92,7 +92,6 @@
<%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} %>
<%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %>