diff --git a/docs/POST_INSTALL_STEPS.md b/docs/POST_INSTALL_STEPS.md index 14c13b91..7daa96cc 100644 --- a/docs/POST_INSTALL_STEPS.md +++ b/docs/POST_INSTALL_STEPS.md @@ -97,7 +97,11 @@ However, as noted below, currencies will use a hardcoded value set by a configur * "MAX_INDUCTION_DAYS" - Maximum number of days since they were inducted before they require another induction. Set to `0` to disable induction requirement. * "MIN_INDUCTION_SCORE" - The minimum score considered a "pass" for the induction course. - * "REQUIRE_ACCESS_CARD" - Require the member to submit their RFID access card number during signup. + * "REQUIRE_ACCESS_CARD" - Require the member to have an RFID access card assigned before completing signup. Set to + `False` to skip the access card step entirely. + * "MEMBER_CAN_ENTER_ACCESS_CARD" - Allow members to enter their own RFID card number during signup. Set to `False` + to require an admin to assign the card (members will see a "Contact Us" button instead). Only applies if + "REQUIRE_ACCESS_CARD" is `True`. * "COLLECT_VEHICLE_REGISTRATION_PLATE" - Allow the portal to collect vehicle registration plate number(s). ### Canvas Integration diff --git a/memberportal/api_general/views.py b/memberportal/api_general/views.py index 35097209..bb3a9472 100644 --- a/memberportal/api_general/views.py +++ b/memberportal/api_general/views.py @@ -48,6 +48,7 @@ def get(self, request): "signup": { "inductionLink": config.INDUCTION_ENROL_LINK, "requireAccessCard": config.REQUIRE_ACCESS_CARD, + "memberCanEnterAccessCard": config.MEMBER_CAN_ENTER_ACCESS_CARD, "postInductionUrl": config.POST_INDUCTION_URL, "collectVehicleRegistrationPlate": config.COLLECT_VEHICLE_REGISTRATION_PLATE, }, diff --git a/memberportal/membermatters/constance_config.py b/memberportal/membermatters/constance_config.py index 9841cf42..6572c9a8 100644 --- a/memberportal/membermatters/constance_config.py +++ b/memberportal/membermatters/constance_config.py @@ -46,7 +46,7 @@ "POST_INDUCTION_URL": ( "https://eventbrite.com.au", "The URL members should visit to book in for a site induction after finishing the online induction." - " (displayed during signup if REQUIRE_ACCESS_CARD == False)", + " (displayed during signup if REQUIRE_ACCESS_CARD == True and MEMBER_CAN_ENTER_ACCESS_CARD == False)", ), # Logo and favicon "SITE_LOGO": ( @@ -310,6 +310,10 @@ True, "If an access card is required to be added to a members profile before signup.", ), + "MEMBER_CAN_ENTER_ACCESS_CARD": ( + True, + "If true, members can enter their own RFID card during signup. If false, they will be prompted to contact an admin (displayed during signup if REQUIRE_ACCESS_CARD == True).", + ), "COLLECT_VEHICLE_REGISTRATION_PLATE": ( False, "Display a field that collects the member's vehicle registration plate on signup & in the profile page.", @@ -439,6 +443,7 @@ "MAX_INDUCTION_DAYS", "MIN_INDUCTION_SCORE", "REQUIRE_ACCESS_CARD", + "MEMBER_CAN_ENTER_ACCESS_CARD", "COLLECT_VEHICLE_REGISTRATION_PLATE", ), ), diff --git a/memberportal/profile/models.py b/memberportal/profile/models.py index 973b2863..10b756ca 100644 --- a/memberportal/profile/models.py +++ b/memberportal/profile/models.py @@ -646,8 +646,8 @@ def can_signup(self): ): required_steps.append("induction") - # check if they have an RFID card assigned - if not self.rfid: + # check if they have an RFID card assigned (only if required by config) + if config.REQUIRE_ACCESS_CARD and not self.rfid: required_steps.append("accessCard") if len(required_steps): diff --git a/src-frontend/src/components/Billing/SignupRequiredSteps.vue b/src-frontend/src/components/Billing/SignupRequiredSteps.vue index 7c7d3c1d..ddcbc496 100644 --- a/src-frontend/src/components/Billing/SignupRequiredSteps.vue +++ b/src-frontend/src/components/Billing/SignupRequiredSteps.vue @@ -95,7 +95,7 @@ {{ $tc('signup.assignAccessCard') }} -