From 80724de7ae17807236db97de5bb6974b3046d7cc Mon Sep 17 00:00:00 2001 From: Igor Richter <93926487+IgorCapCoder@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:56:31 +0200 Subject: [PATCH] N21 1264 new class page extension (#3335) * change referrer depending on feature flag for safeBackRedirect --- controllers/administration.js | 6 ++++-- views/administration/dashboard.hbs | 2 +- views/administration/forms/form-classes-manage.hbs | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/controllers/administration.js b/controllers/administration.js index 36f50e2fcf..8594ab4e7f 100644 --- a/controllers/administration.js +++ b/controllers/administration.js @@ -1617,7 +1617,8 @@ const renderClassEdit = (req, res, next) => { class: currentClass, gradeLevels, isCustom, - referrer: '/administration/classes/', + referrer: Configuration.get('FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED') + ? '/administration/groups/classes/' : '/administration/classes/', }); }, ); @@ -1848,7 +1849,8 @@ router.get( students: filterStudents(res, students), schoolUsesLdap: res.locals.currentSchoolData.ldapSchoolIdentifier, notes, - referrer: '/administration/classes/', + referrer: Configuration.get('FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED') + ? '/administration/groups/classes/' : '/administration/classes/', consentsMissing: usersWithoutConsent.length !== 0, consentNecessary, // eslint-disable-next-line max-len diff --git a/views/administration/dashboard.hbs b/views/administration/dashboard.hbs index ee9cd93571..b1500eb561 100644 --- a/views/administration/dashboard.hbs +++ b/views/administration/dashboard.hbs @@ -61,7 +61,7 @@ {{#userHasPermission 'CLASS_LIST'}} {{#if (getConfig "FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED")}}
-