Skip to content
Snippets Groups Projects
Commit 94e14de8 authored by Isaac Evavold's avatar Isaac Evavold Committed by Isaac Evavold
Browse files

ROENROLL-1517 inline message when searching for invalid subject

parent 0e070a67
No related branches found
No related tags found
No related merge requests found
Pipeline #35769 passed
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
</mat-form-field> </mat-form-field>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-hint align="end" *ngIf="courseSearchForm?.get('subject')?.invalid">
Please select an existing subject or &lsquo;All&rsquo;
</mat-hint>
<input <input
type="text" type="text"
placeholder="Subject" placeholder="Subject"
......
...@@ -200,9 +200,7 @@ export class CourseSearchComponent implements OnInit, OnDestroy { ...@@ -200,9 +200,7 @@ export class CourseSearchComponent implements OnInit, OnDestroy {
const subjectCode = this.getSubjectCode(subject); const subjectCode = this.getSubjectCode(subject);
if (!subjectCode) { if (!subjectCode) {
this.snackBar.open('Please select a valid subject', undefined, { this.courseSearchForm.controls['subject'].setErrors({ invalid: true });
duration: 6000,
});
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment