aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin/reportextrafields.t
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-08-14 16:06:41 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-08-29 18:12:38 +0100
commit7570b9d1d95ec5a5ee58df69feab487be78831aa (patch)
tree3ae88581f4b97ec09e729395d5030bffaac2e6a8 /t/app/controller/admin/reportextrafields.t
parent39fd4d22fec9425743b0a9ebced6d1b73c3d857b (diff)
Add admin to disable reporting form per category.
Remove all existing hard-coded register_category calls, and have a new way of implementing staff_ignore.
Diffstat (limited to 't/app/controller/admin/reportextrafields.t')
-rw-r--r--t/app/controller/admin/reportextrafields.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/app/controller/admin/reportextrafields.t b/t/app/controller/admin/reportextrafields.t
index 6011b13e3..070e3e2fc 100644
--- a/t/app/controller/admin/reportextrafields.t
+++ b/t/app/controller/admin/reportextrafields.t
@@ -82,6 +82,7 @@ FixMyStreet::override_config {
description => "this is a test description",
datatype_description => "hint here",
datatype => "string",
+ disable_form => "false",
};
$contact->discard_changes;
is_deeply $contact->get_extra_fields, $contact_extra_fields, 'new string field was added';
@@ -93,6 +94,7 @@ FixMyStreet::override_config {
"metadata[1].code" => "list_test",
"metadata[1].required" => undef,
"metadata[1].notice" => "",
+ "metadata[1].disable_form" => "on",
"metadata[1].description" => "this field is a list",
"metadata[1].datatype_description" => "",
"metadata[1].datatype" => "list",
@@ -108,6 +110,7 @@ FixMyStreet::override_config {
required => "false",
variable => "true",
protected => "false",
+ disable_form => "true",
description => "this field is a list",
datatype_description => "",
datatype => "singlevaluelist",
@@ -145,6 +148,7 @@ FixMyStreet::override_config {
required => 'false',
variable => 'true',
protected => 'false',
+ disable_form => 'false',
code => 'POT',
automated => 'server_set'
} ], "automated fields not unset";
@@ -181,6 +185,7 @@ FixMyStreet::override_config {
required => "true",
variable => "true",
protected => "false",
+ disable_form => "false",
description => "this is a test description",
datatype_description => "hint here",
datatype => "string",
@@ -209,6 +214,7 @@ FixMyStreet::override_config {
required => "false",
variable => "true",
protected => "false",
+ disable_form => "false",
description => "this field is a list",
datatype_description => "",
datatype => "singlevaluelist",
@@ -239,6 +245,7 @@ FixMyStreet::override_config {
required => "false",
variable => "true",
protected => "false",
+ disable_form => "false",
description => "",
datatype_description => "",
datatype => "string",