-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FMS] Add parent categories to dashboard categories view
Add an 'All' subcategories checkbox to select all the categories in one group Arbitrary decision to choose the first parent category from the groups method of a contact. mysociety/societyworks#1458
- Loading branch information
1 parent
0f7ddeb
commit 5b34f3c
Showing
6 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,10 @@ my $superuser = $mech->create_user_ok('[email protected]', name => 'Super Us | |
|
||
my $oxfordshire = $mech->create_body_ok(2237, 'Oxfordshire County Council'); | ||
my $user3 = $mech->create_user_ok('[email protected]', name => 'Body User', from_body => $oxfordshire); | ||
my $oxfordshirecontact = $mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Potholes', email => '[email protected]' ); | ||
my $oxfordshirecontact = $mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Potholes', email => '[email protected]', extra => { group => 'Road' } ); | ||
$mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Traffic lights', email => '[email protected]' ); | ||
$mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Yellow lines', email => '[email protected]', extra => { group => 'Road' } ); | ||
|
||
|
||
my $oxford = $mech->create_body_ok(2421, 'Oxford City Council'); | ||
$mech->create_contact_ok( body_id => $oxford->id, category => 'Graffiti', email => '[email protected]' ); | ||
|
@@ -58,7 +60,7 @@ my $log_entries = FixMyStreet::DB->resultset('AdminLog')->search( | |
object_type => 'problem', | ||
object_id => $report->id | ||
}, | ||
{ | ||
{ | ||
order_by => { -desc => 'id' }, | ||
} | ||
); | ||
|
@@ -455,7 +457,8 @@ subtest 'change report category' => sub { | |
whensent => \'current_timestamp', | ||
}); | ||
$mech->get_ok("/admin/report_edit/" . $ox_report->id); | ||
|
||
$mech->content_contains('<optgroup label="Road">'); | ||
$mech->content_lacks('<option value="group-Road"'); | ||
$mech->submit_form_ok( { with_fields => { category => 'Traffic lights' } }, 'form_submitted' ); | ||
$ox_report->discard_changes; | ||
is $ox_report->category, 'Traffic lights'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters