Show date with year in message to banned users who try to log in
This commit is contained in:
parent
023d18cab2
commit
c1a39b5a30
2 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,7 @@ class SessionController < ApplicationController
|
||||||
if @user.confirm_password?(params[:password])
|
if @user.confirm_password?(params[:password])
|
||||||
|
|
||||||
if @user.is_banned?
|
if @user.is_banned?
|
||||||
render json: { error: I18n.t("login.banned", {date: I18n.l(@user.banned_till, format: :short_no_year)}) }
|
render json: { error: I18n.t("login.banned", {date: I18n.l(@user.banned_till, format: :date_only)}) }
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ en:
|
||||||
formats:
|
formats:
|
||||||
short: "%m-%d-%Y"
|
short: "%m-%d-%Y"
|
||||||
short_no_year: "%B %-d"
|
short_no_year: "%B %-d"
|
||||||
|
date_only: "%b %-d, %Y"
|
||||||
|
|
||||||
title: "Discourse"
|
title: "Discourse"
|
||||||
topics: "Topics"
|
topics: "Topics"
|
||||||
|
|
Reference in a new issue