mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 00:24:42 +08:00
Please Hound
This commit is contained in:
parent
280b7a0e75
commit
1b6f50647c
1 changed files with 37 additions and 36 deletions
|
@ -36,7 +36,8 @@ module Users
|
||||||
render json: {
|
render json: {
|
||||||
html: render_to_string(
|
html: render_to_string(
|
||||||
partial:
|
partial:
|
||||||
'users/settings/user_teams/leave_user_team_modal_body.html.erb',
|
'users/settings/user_teams/' \
|
||||||
|
'leave_user_team_modal_body.html.erb',
|
||||||
locals: { user_team: @user_team }
|
locals: { user_team: @user_team }
|
||||||
),
|
),
|
||||||
heading: I18n.t(
|
heading: I18n.t(
|
||||||
|
@ -68,7 +69,6 @@ module Users
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
respond_to do |format|
|
|
||||||
# If user is last administrator of team,
|
# If user is last administrator of team,
|
||||||
# he/she cannot be deleted from it.
|
# he/she cannot be deleted from it.
|
||||||
invalid =
|
invalid =
|
||||||
|
@ -108,6 +108,7 @@ module Users
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
if !invalid
|
if !invalid
|
||||||
if params[:leave]
|
if params[:leave]
|
||||||
flash[:notice] = I18n.t(
|
flash[:notice] = I18n.t(
|
||||||
|
|
Loading…
Add table
Reference in a new issue