From 06d905f415f38ed8e13f6390a93a0db928dee6a7 Mon Sep 17 00:00:00 2001 From: sdukhovni Date: Mon, 24 Jul 2017 22:26:55 +1000 Subject: Allow domain blocks that only reject media without silencing or suspending (#4325) * Allow domain blocks to reject media without silencing or suspending * Fix typo * Hide 'Reject media' button when superfluous, instead of disabling it * Properly hide 'reject media' checkbox on page load if needed This may happen when resubmitting the domain block form after an error. * Don't ask whether undoing a media-only block should be retroactive * Rename :media_only block to :noop * Display :noop block as None in frontend, allow blocks that do nothing * Remove 'coding' line auto-added by emacs --- app/models/domain_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb index f26e8183f..aea8919af 100644 --- a/app/models/domain_block.rb +++ b/app/models/domain_block.rb @@ -12,7 +12,7 @@ # class DomainBlock < ApplicationRecord - enum severity: [:silence, :suspend] + enum severity: [:silence, :suspend, :noop] attr_accessor :retroactive -- cgit