forked from saurabh/orbit4-5
Merge branch 'development' of gitlab.tp.rulingcom.com:saurabh/orbit4-5 into gravity
Conflicts: app/views/admin/members/show.html.erb
This commit is contained in:
commit
a6c7652851
|
@ -65,7 +65,7 @@ class SessionsController < ApplicationController
|
|||
end
|
||||
|
||||
def google_remove
|
||||
current_user.google.destroy
|
||||
current_user.google.destroy rescue ""
|
||||
redirect_to admin_member_path(current_user.member_profile.to_param) and return
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h4><span><%= t("social_profile_connections")%></span></h4>
|
||||
<dl>
|
||||
<% if current_site.google_oauth_enabled %>
|
||||
<dt id="google_connection"><div class="main_text">Google <span class="pull-right"><input <%= (!@member.user.google.nil? ? "checked=checked" : "") %> type="checkbox" id="google_connect_box" class="toggle-check set-sidebar-state" data-disabled="true"></span></div><div class="wait_text" style="text-align:center; display:none;">Please wait...</div></dt>
|
||||
<dt id="google_connection"><div class="main_text">Google <span class="pull-right"><input <%= (!@member.user.google.nil? ? "checked=checked" : "") %> type="checkbox" id="google_connect_box" class="set-sidebar-state" data-disabled="true"></span></div><div class="wait_text" style="text-align:center; display:none;">Please wait...</div></dt>
|
||||
<% end %>
|
||||
</dl>
|
||||
</div>
|
|
@ -72,8 +72,10 @@
|
|||
$("#google_connect_box").on("click",function(){
|
||||
$("#google_connection div.main_text").css("opacity","0.5");
|
||||
$("#google_connection div.wait_text").show();
|
||||
if($(this).parent().hasClass("disable")){
|
||||
if(confirm("Are you sure?")){
|
||||
if($(this).is(":checked")){
|
||||
window.location.href = "/auth/google_oauth2";
|
||||
}else{
|
||||
if(confirm("Are you sure?")){
|
||||
window.location.href = "/auth/google_oauth2/remove";
|
||||
}else{
|
||||
$("#google_connection div.main_text").css("opacity","1");
|
||||
|
|
Loading…
Reference in New Issue