diff --git a/app/views/admin/domain_blocks/new.html.haml b/app/views/admin/domain_blocks/new.html.haml index f73f5e93d2..38fa901690 100644 --- a/app/views/admin/domain_blocks/new.html.haml +++ b/app/views/admin/domain_blocks/new.html.haml @@ -1,17 +1,17 @@ - content_for :page_title do - = t('admin.domain_blocks.new.title') + = t('.title') = simple_form_for @domain_block, url: admin_domain_blocks_path do |f| = render 'shared/error_messages', object: @domain_block - %p.hint= t('admin.domain_blocks.new.hint') + %p.hint= t('.hint') = f.input :domain, placeholder: t('admin.domain_blocks.domain') - = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| I18n.t("admin.domain_blocks.new.severity.#{type}") } + = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t(".severity.#{type}") } - %p.hint= t('admin.domain_blocks.new.severity.desc_html') + %p.hint= t('.severity.desc_html') = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint') .actions - = f.button :button, t('admin.domain_blocks.new.create'), type: :submit + = f.button :button, t('.create'), type: :submit diff --git a/app/views/admin/domain_blocks/show.html.haml b/app/views/admin/domain_blocks/show.html.haml index 594da42618..49933cbd99 100644 --- a/app/views/admin/domain_blocks/show.html.haml +++ b/app/views/admin/domain_blocks/show.html.haml @@ -3,7 +3,13 @@ = simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :delete do |f| - = f.input :retroactive, as: :boolean, wrapper: :with_label, label: I18n.t("admin.domain_blocks.show.retroactive.#{@domain_block.severity}"), hint: I18n.t('admin.domain_blocks.show.affected_accounts', count: Account.where(domain: @domain_block.domain).count) + = f.input :retroactive, + as: :boolean, + wrapper: :with_label, + label: t(".retroactive.#{@domain_block.severity}"), + hint: t(:affected_accounts, + scope: [:admin, :domain_blocks, :show], + count: Account.where(domain: @domain_block.domain).count) .actions - = f.button :button, t('admin.domain_blocks.show.undo'), type: :submit + = f.button :button, t('.undo'), type: :submit