From a22816d18a708cf71a8fa308b18b4cec53b87097 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Fri, 29 Mar 2019 10:06:49 +0000 Subject: [PATCH] Add battery conflict report to acl.yaml. Add route to controller for battery conflict report #197 --- config/acl.yaml | 2 ++ config/routes/report.yaml | 10 ++++++++++ src/Controller/ReportController.php | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/config/acl.yaml b/config/acl.yaml index a1152234..6655e53f 100644 --- a/config/acl.yaml +++ b/config/acl.yaml @@ -248,3 +248,5 @@ access_keys: label: Menu - id: report.reject label: Rejection Report + - id: report.battery.conflict + label: Battery Conflict Report diff --git a/config/routes/report.yaml b/config/routes/report.yaml index 483d7254..c8560798 100644 --- a/config/routes/report.yaml +++ b/config/routes/report.yaml @@ -17,3 +17,13 @@ rep_reject_detail_submit: path: /report/rejection_detail controller: App\Controller\ReportController::rejectDetailSubmit methods: [POST] + +rep_battery_conflict_form: + path: /report/battery_conflict + controller: App\Controller\ReportController::batteryConflictForm + methods: [GET] + +rep_battery_conflict_submit: + path: /report/battery_conflict + controller: App\Controller\ReportController::batteryConflictSubmit + methods: [POST] diff --git a/src/Controller/ReportController.php b/src/Controller/ReportController.php index 7d302694..3ddd65d4 100644 --- a/src/Controller/ReportController.php +++ b/src/Controller/ReportController.php @@ -260,4 +260,13 @@ class ReportController extends BaseController ]); */ } + + public function batteryConflictForm() + { + $this->denyAccessUnlessGranted('report.battery.conflict', null, 'No access.'); + + $params = $this->initParameters(); + + return $this->render('', $params); + } }