mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-24 16:55:09 +08:00
Fix user preferences date format selector [SCI-5815]
This commit is contained in:
parent
b7513c6d5f
commit
b132a13698
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@
|
|||
<div class="date-format-selector-container">
|
||||
<%= select_tag "date-format-input-field",
|
||||
options_for_select(
|
||||
Constants::SUPPORTED_DATE_FORMATS.uniq.map{ |df|
|
||||
Constants::SUPPORTED_DATE_FORMATS.map { |df|
|
||||
["#{l(Time.new(2019, 11, 25), format: :full_date, date_format: df)}", df]
|
||||
},
|
||||
@user.settings[:date_format]
|
||||
|
|
|
@ -14,7 +14,7 @@ class CustomI18nBackend < I18n::Backend::Simple
|
|||
end
|
||||
|
||||
def localize(locale, object, format = :default, options = {})
|
||||
options[:date_format] = date_format
|
||||
options[:date_format] ||= date_format
|
||||
super(locale, object, format, options)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue