From 82b9436c508fd9739555240991abda1b2fd63bd4 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 11 Nov 2016 14:59:25 +0100 Subject: rename coordinator to supporter --- includes/controller/angeltypes_controller.php | 12 ++++----- includes/controller/user_angeltypes_controller.php | 30 +++++++++++----------- .../controller/user_driver_licenses_controller.php | 13 +++++----- 3 files changed, 27 insertions(+), 28 deletions(-) (limited to 'includes/controller') diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index 3476f3e6..548cf3e7 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -112,7 +112,7 @@ function angeltype_edit_controller() { $description = $angeltype['description']; $requires_driver_license = $angeltype['requires_driver_license']; - if (! User_is_AngelType_coordinator($user, $angeltype)) { + if (! User_is_AngelType_supporter($user, $angeltype)) { redirect(page_link_to('angeltypes')); } } else { @@ -121,13 +121,13 @@ function angeltype_edit_controller() { } } - // In coordinator mode only allow to modify description - $coordinator_mode = ! in_array('admin_angel_types', $privileges); + // In supporter mode only allow to modify description + $supporter_mode = ! in_array('admin_angel_types', $privileges); if (isset($_REQUEST['submit'])) { $valid = true; - if (! $coordinator_mode) { + if (! $supporter_mode) { if (isset($_REQUEST['name'])) { $result = AngelType_validate_name($_REQUEST['name'], $angeltype); $name = $result->getValue(); @@ -168,7 +168,7 @@ function angeltype_edit_controller() { return [ sprintf(_("Edit %s"), $name), - AngelType_edit_view($name, $restricted, $description, $coordinator_mode, $requires_driver_license) + AngelType_edit_view($name, $restricted, $description, $supporter_mode, $requires_driver_license) ]; } @@ -200,7 +200,7 @@ function angeltype_controller() { return [ sprintf(_("Team %s"), $angeltype['name']), - AngelType_view($angeltype, $members, $user_angeltype, in_array('admin_user_angeltypes', $privileges) || $user_angeltype['coordinator'], in_array('admin_angel_types', $privileges), $user_angeltype['coordinator'], $user_driver_license, $user) + AngelType_view($angeltype, $members, $user_angeltype, in_array('admin_user_angeltypes', $privileges) || $user_angeltype['supporter'], in_array('admin_angel_types', $privileges), $user_angeltype['supporter'], $user_driver_license, $user) ]; } diff --git a/includes/controller/user_angeltypes_controller.php b/includes/controller/user_angeltypes_controller.php index 663f7826..f58187b2 100644 --- a/includes/controller/user_angeltypes_controller.php +++ b/includes/controller/user_angeltypes_controller.php @@ -1,7 +1,7 @@ ' . _("driving license information") . ''), true); } } - if ($driving_license_information_required && $user_driver_license == null) { - return info(sprintf(_("You joined an angeltype which requires a driving license. Please edit your driving license information here: %s."), '' . _("driving license information") . ''), true); - } - return ''; } -- cgit v1.2.3-70-g09d2