mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-23 03:57:47 +01:00
Add accept attribute to file inputs
This commit is contained in:
parent
ae7ede9c2c
commit
c995ead1e0
2 changed files with 11 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
.pull-left
|
.pull-left
|
||||||
%img.avatar-lg.mr-3{ src: current_user.profile_picture.url(:medium) }
|
%img.avatar-lg.mr-3{ src: current_user.profile_picture.url(:medium) }
|
||||||
.media-body
|
.media-body
|
||||||
= f.file_field :profile_picture, label: t('views.settings.profile.avatar')
|
= f.file_field :profile_picture, label: t('views.settings.profile.avatar'), accept: APP_CONFIG[:accepted_image_formats].join(',')
|
||||||
|
|
||||||
.row#profile-picture-crop-controls{ style: 'display: none;' }
|
.row#profile-picture-crop-controls{ style: 'display: none;' }
|
||||||
.col-sm-10.col-md-8
|
.col-sm-10.col-md-8
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
.col
|
.col
|
||||||
%img.mw-100.mr-3{ src: current_user.profile_header.url(:mobile) }
|
%img.mw-100.mr-3{ src: current_user.profile_header.url(:mobile) }
|
||||||
.col-xs-12.mt-3.mt-sm-0.pl-3.pr-3
|
.col-xs-12.mt-3.mt-sm-0.pl-3.pr-3
|
||||||
= f.file_field :profile_header, label: t('views.settings.profile.header')
|
= f.file_field :profile_header, label: t('views.settings.profile.header'), accept: APP_CONFIG[:accepted_image_formats].join(',')
|
||||||
|
|
||||||
.row#profile-header-crop-controls{ style: 'display: none;' }
|
.row#profile-header-crop-controls{ style: 'display: none;' }
|
||||||
.col-sm-10.col-md-8
|
.col-sm-10.col-md-8
|
||||||
|
|
|
@ -59,3 +59,12 @@ hcaptcha:
|
||||||
|
|
||||||
# TOTP Drift period in seconds
|
# TOTP Drift period in seconds
|
||||||
otp_drift_period: 30
|
otp_drift_period: 30
|
||||||
|
|
||||||
|
accepted_image_formats:
|
||||||
|
- image/jpeg
|
||||||
|
- .jpg
|
||||||
|
- .jpeg
|
||||||
|
- image/png
|
||||||
|
- .png
|
||||||
|
- image/gif
|
||||||
|
- .gif
|
||||||
|
|
Loading…
Reference in a new issue