Skip to content

Commit

Permalink
N21 1264 new class page extension (#3335)
Browse files Browse the repository at this point in the history
* change referrer depending on feature flag for safeBackRedirect
  • Loading branch information
IgorCapCoder authored Oct 20, 2023
1 parent 471f3e7 commit 80724de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions controllers/administration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
});
},
);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion views/administration/dashboard.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{{#userHasPermission 'CLASS_LIST'}}
{{#if (getConfig "FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED")}}
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="card h-100 teacher-option locationlink" data-loclink="/administration/groups/classes" data-testid="administrate_classes">
<div class="card h-100 teacher-option locationlink" data-loclink="/administration/groups/classes" data-testid="administrate_classes_new">
<div class="card-block homework">
<div class="card-text">
<h2 class="h4"><i class="fa fa-users"></i> {{$t "administration.dashboard.headline.manageClassesNew" }}</h2>
Expand Down
2 changes: 1 addition & 1 deletion views/administration/forms/form-classes-manage.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<div class="modal-footer mt-1">
<a class="btn btn-secondary btn-cancel">{{$t "global.button.cancel" }}</a>
<button type="submit" class="btn btn-primary">{{$t "global.button.saveChanges" }}</button>
<button data-testid="manage-confirm" type="submit" class="btn btn-primary">{{$t "global.button.saveChanges" }}</button>
</div>

<hr class="my-2"/>
Expand Down

0 comments on commit 80724de

Please sign in to comment.