Skip to content

Commit

Permalink
Merge pull request #280 from KTH/fix/KUI-1136/alert-logic
Browse files Browse the repository at this point in the history
Fix/k UI 1136/alert logic
  • Loading branch information
vsdkth authored Feb 5, 2024
2 parents 46eb378 + 4470ea0 commit fca646b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion i18n/messages.en.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
skip_to_main_content: 'Skip to main content',
back_to_top_label: 'To page top',
},
bankIdAlertText: `Please note that <a href="https://intra.kth.se/en/utbildning/tentamen-och-schema/lasarsindelning/lasarsindelning-1.1201135" class="external-link" target="_blank" rel="noopener noreferrer">Students not located in Sweden may have problems attending a course at KTH.</a> <br/> You could meet obstacles if you're required to pay fees or if you do not have a Swedish Mobile BankID. `,
bankIdAlertText: `Please note that <a href="https://www.kth.se/en/studies/freestanding-courses/applying-to-a-course-if-you-are-not-in-sweden-1.1275545" class="external-link" target="_blank" rel="noopener noreferrer">Students not located in Sweden may have problems attending a course at KTH.</a> <br/> You could meet obstacles if you're required to pay fees or if you do not have a Swedish Mobile BankID. `,
breadCrumbLabels: {
breadcrumbs: 'Breadcrumbs',
university: 'KTH',
Expand Down
7 changes: 3 additions & 4 deletions public/js/app/pages/CoursePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function CoursePage() {
syllabusInfoFade,
useStartSemesterFromQuery,
lang,
roundSelectedIndex,
} = context
// * * //
const hasOnlyOneRound = activeSemester?.length > 0 && courseData.roundList[activeSemester].length === 1
Expand Down Expand Up @@ -180,10 +179,10 @@ function CoursePage() {
<img className="float-md-start" src={courseImage} alt="" height="auto" width="300px" />
<div className="paragraphs" dangerouslySetInnerHTML={{ __html: introText }} />
</Col>
{courseData.roundList && (
{courseData.roundList && activeSemesters.length > 0 && hasToShowRoundsData && (
<BankIdAlert
tutoringForm={courseData.roundList[activeSemester][roundSelectedIndex].round_tutoring_form}
fundingType={courseData.roundList[activeSemester][roundSelectedIndex].round_funding_type}
tutoringForm={courseData.roundList[activeSemester][activeRoundIndex].round_tutoring_form}
fundingType={courseData.roundList[activeSemester][activeRoundIndex].round_funding_type}
contextLang={lang}
roundSpecified={activeSemesters.length > 0 && hasToShowRoundsData}
translation={translation}
Expand Down

0 comments on commit fca646b

Please sign in to comment.