Show date with year in message to banned users who try to log in
This commit is contained in:
parent
023d18cab2
commit
c1a39b5a30
|
@ -30,7 +30,7 @@ class SessionController < ApplicationController
|
|||
if @user.confirm_password?(params[:password])
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ en:
|
|||
formats:
|
||||
short: "%m-%d-%Y"
|
||||
short_no_year: "%B %-d"
|
||||
date_only: "%b %-d, %Y"
|
||||
|
||||
title: "Discourse"
|
||||
topics: "Topics"
|
||||
|
|
Loading…
Reference in New Issue