mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 21:57:19 +00:00
Add ip_blocks_expires_options
helper method for collection options
This commit is contained in:
parent
44d92fa4f6
commit
340219284a
|
@ -9,4 +9,8 @@ module Admin::IpBlocksHelper
|
|||
]
|
||||
)
|
||||
end
|
||||
|
||||
def ip_blocks_expires_options
|
||||
[1.day, 2.weeks, 1.month, 6.months, 1.year, 3.years]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
.fields-group
|
||||
= f.input :expires_in,
|
||||
collection: [1.day, 2.weeks, 1.month, 6.months, 1.year, 3.years].map(&:to_i),
|
||||
collection: ip_blocks_expires_options.map(&:to_i),
|
||||
label_method: ->(i) { I18n.t("admin.ip_blocks.expires_in.#{i}") },
|
||||
prompt: I18n.t('invites.expires_in_prompt'),
|
||||
wrapper: :with_block_label
|
||||
|
|
Loading…
Reference in a new issue