Skip to content

Commit 92ba007

Browse files
committed
Merge branch 'master' of github.com:isaacphysics/isaac-react-app into cs-related-questions
2 parents 45fa286 + 1615f24 commit 92ba007

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

src/app/components/content/IsaacQuestion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ const IsaacQuestionComponent = ({doc, validationResponse, currentAttempt, canSub
256256
{(!validationResponse || !validationResponse.correct || canSubmit) && !locked &&
257257
<div className="d-flex align-items-stretch flex-column-reverse flex-sm-row flex-md-column-reverse flex-lg-row">
258258
{secondaryAction && <div
259-
className={`text-center pt-3 pb-1 w-100 w-sm-50 w-md-100 w-lg-50 ${primaryAction ? "pr-sm-2 pr-md-0 pr-lg-3" : ""}`}
259+
className={`m-auto pt-3 pb-1 w-100 w-sm-50 w-md-100 w-lg-50 ${primaryAction ? "pr-sm-2 pr-md-0 pr-lg-3" : ""}`}
260260
>
261261
<input {...secondaryAction} className="h-100 btn btn-outline-primary btn-block" />
262262
</div>}
263263
{primaryAction && <div
264-
className={`text-center pt-3 pb-1 w-100 w-sm-50 w-md-100 w-lg-50 ${secondaryAction ? "pl-sm-2 pl-md-0 pl-lg-3" : ""}`}
264+
className={`m-auto pt-3 pb-1 w-100 w-sm-50 w-md-100 w-lg-50 ${secondaryAction ? "pl-sm-2 pl-md-0 pl-lg-3" : ""}`}
265265
>
266266
<input {...primaryAction} className="h-100 btn btn-secondary btn-block" />
267267
</div>}

src/app/components/elements/Accordion.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ const AccordionComponent = ({id, trustedTitle, index, children, location: {hash}
140140
}}
141141
aria-expanded={open ? "true" : "false"}
142142
>
143-
{level && <span className="accordion-level badge-secondary">Level {level}</span>}
143+
{/*TODO CS Level*/}
144+
{SITE_SUBJECT === SITE.PHY && level && <span className="accordion-level badge-secondary">Level {level}</span>}
144145
<div className="accordion-title pl-3">
145146
<RS.Row><span className="accordion-part p-3 text-secondary">Part {ALPHABET[index % ALPHABET.length]} {" "}</span>
146147
{trustedTitle && <div className="p-3"><TrustedHtml html={trustedTitle} /></div>}</RS.Row>

src/app/components/elements/RelatedContent.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {logAction} from "../../state/actions";
88
import {SITE, SITE_SUBJECT} from "../../services/siteConstants";
99
import {sortByNumberStringValue, sortByStringValue} from "../../services/sorting";
1010

11+
1112
interface RelatedContentProps {
1213
content: ContentSummaryDTO[];
1314
parentPage: ContentDTO;
@@ -141,6 +142,7 @@ export const RelatedContentComponent = ({content, parentPage, logAction}: Relate
141142
target={openInNewTab ? "_blank" : undefined}
142143
>
143144
{contentSummary.title}
145+
{/*TODO CS Level*/}
144146
{SITE_SUBJECT === SITE.PHY && contentSummary.level && contentSummary.level != '0' && " (Level " + contentSummary.level + ")"}
145147
</Link>
146148
</ListGroupItem>

src/app/components/handlers/PasswordResetHandler.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const ResetPasswordHandlerComponent = ({urlToken, handleResetPassword, verifyPas
5151
<CardBody>
5252
<Form name="passwordReset">
5353
<FormGroup>
54-
<Label htmlFor="password-input">New password</Label>
55-
<Input id="password" type="password" name="password"
54+
<Label htmlFor="password">New password</Label>
55+
<Input id="password" type="password" name="password-new"
5656
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
5757
passwordDebounce(e.target.value, setPasswordFeedback);
5858
}}
@@ -71,7 +71,7 @@ const ResetPasswordHandlerComponent = ({urlToken, handleResetPassword, verifyPas
7171
</FormGroup>
7272
<FormGroup>
7373
<Label htmlFor="password-confirm">Re-enter new password</Label>
74-
<Input invalid={!isValidPassword} id="password-confirm" type="password" name="password" onBlur={(e: any) => {
74+
<Input invalid={!isValidPassword} id="password-confirm" type="password" name="password-new-confirm" onBlur={(e: any) => {
7575
validateAndSetPassword(e);
7676
(e.target.value == (document.getElementById("password") as HTMLInputElement).value) ? setCurrentPassword(e.target.value) : null}
7777
} aria-describedby="invalidPassword" required/>
@@ -83,7 +83,12 @@ const ResetPasswordHandlerComponent = ({urlToken, handleResetPassword, verifyPas
8383
<h4 role="alert" className="text-danger text-center mb-0">
8484
{errorMessage && errorMessage.type === "generalError" && errorMessage.generalError}
8585
</h4>
86-
<Button color="secondary" className="mb-2" block onClick={(e: any) => (isValidPassword && !errorMessage) ? handleResetPassword({token: urlToken, password: currentPassword}) : null}>Change Password</Button>
86+
<Button color="secondary" className="mb-2" block
87+
onClick={() => (isValidPassword && !errorMessage) ? handleResetPassword({token: urlToken, password: currentPassword}) : null}
88+
id="change-password"
89+
>
90+
Change Password
91+
</Button>
8792
</CardFooter>
8893
</Card>
8994
</div>

src/app/components/pages/Gameboard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ const gameboardItem = (gameboard: GameboardDTO, question: GameboardItem) => {
6868
{tags.map(tag => (<span className="gameboard-tag" key={tag.id}>{tag.title}</span>))}
6969
</div>}
7070
</div>
71-
{question.level !== undefined && question.level !== 0 &&
71+
{/*TODO CS Level*/}
72+
{SITE_SUBJECT === SITE.PHY && question.level !== undefined && question.level !== 0 &&
7273
<span className="gameboard-tags">Level {question.level}</span>}
7374
</Link>
7475
</RS.ListGroupItem>;

src/app/components/pages/LogIn.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ const LogInPageComponent = ({user, handleProviderLoginRedirect, logInUser, reset
122122
Forgotten your password?
123123
</Button> :
124124
<p>
125-
<strong className="d-block">Your password reset request is being processed.</strong>
125+
<strong id="password-reset-processing" className="d-block">
126+
Your password reset request is being processed.
127+
</strong>
126128
<strong className="d-block">Please check your inbox.</strong>
127129
</p>
128130
}

0 commit comments

Comments
 (0)