Skip to content

Commit

Permalink
Fix Button Casing (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaygandecha authored Mar 14, 2024
1 parent d75eeb6 commit 891b2bf
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button routerLink="/academics/admin/course">
CANCEL
Cancel
</button>
<button mat-stroked-button type="submit" [disabled]="courseForm.invalid">
SAVE
Save
</button>
</mat-card-actions>
</mat-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button routerLink="/academics/admin/room">
CANCEL
Cancel
</button>
<button mat-stroked-button type="submit" [disabled]="roomForm.invalid">
SAVE
Save
</button>
</mat-card-actions>
</mat-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button routerLink="/academics/admin/section">
CANCEL
Cancel
</button>
<button mat-stroked-button type="submit" [disabled]="sectionForm.invalid">
SAVE
Save
</button>
</mat-card-actions>
</mat-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button routerLink="/academics/admin/term">
CANCEL
Cancel
</button>
<button mat-stroked-button type="submit" [disabled]="termForm.invalid">
SAVE
Save
</button>
</mat-card-actions>
</mat-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
<!-- Cancel and Save Buttons -->
<mat-card-actions>
<button mat-stroked-button type="button" (click)="onCancel()">
CANCEL
Cancel
</button>

<button mat-stroked-button type="submit" [disabled]="eventForm.invalid">
SAVE
Save
</button>
</mat-card-actions>
</mat-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@
<mat-card-actions>
<!-- Cancel Button -->
<button mat-stroked-button type="button" (click)="onCancel()">
CANCEL
Cancel
</button>
<!-- Submit Button -->
<button
mat-stroked-button
type="submit"
[disabled]="organizationForm.invalid">
SAVE
Save
</button>
</mat-card-actions>
</mat-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<a
class="details-link"
[routerLink]="['/organizations', organization.slug]">
<button mat-stroked-button>DETAILS</button>
<button mat-stroked-button>Details</button>
</a>
</mat-card-actions>
</mat-card>
157 changes: 93 additions & 64 deletions frontend/src/app/profile/profile-editor/profile-editor.component.html
Original file line number Diff line number Diff line change
@@ -1,70 +1,99 @@
<form [formGroup]="profileForm" (ngSubmit)="onSubmit()">
<mat-card appearance="outlined">
<mat-card-header *ngIf="profile.id; else registration">
<mat-card-title>Update your Profile</mat-card-title>
</mat-card-header>
<ng-template #registration>
<mat-card-header>
<mat-card-title>Welcome to CSXL! Please verify and complete your profile
below.</mat-card-title>
<mat-card-subtitle>
Once your profile is setup you will be able to take advantage of CSXL
initiatives such as enrolling in workshops, reserving a desk during
coworking hours, and more!
</mat-card-subtitle>
</mat-card-header>
</ng-template>
<mat-card-content>
<mat-form-field appearance="outline">
<mat-label>First Name</mat-label>
<input matInput placeholder="Jane" formControlName="first_name" name="first_name" required />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Last Name</mat-label>
<input matInput placeholder="Doe" formControlName="last_name" name="last_name" required />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>UNC Email</mat-label>
<input matInput type="email" placeholder="[email protected]" formControlName="email" name="email"
required />
<mat-error *ngIf="profileForm.value.email">Must provide a valid UNC email address.</mat-error>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Pronouns</mat-label>
<input matInput placeholder="she / her / hers" formControlName="pronouns" name="pronouns" required />
</mat-form-field>
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button type="submit" [disabled]="profileForm.invalid">
SAVE
</button>
</mat-card-actions>
</mat-card>
<mat-card appearance="outlined">
<mat-card-header *ngIf="profile.id; else registration">
<mat-card-title>Update your Profile</mat-card-title>
</mat-card-header>
<ng-template #registration>
<mat-card-header>
<mat-card-title
>Welcome to CSXL! Please verify and complete your profile
below.</mat-card-title
>
<mat-card-subtitle>
Once your profile is setup you will be able to take advantage of CSXL
initiatives such as enrolling in workshops, reserving a desk during
coworking hours, and more!
</mat-card-subtitle>
</mat-card-header>
</ng-template>
<mat-card-content>
<mat-form-field appearance="outline">
<mat-label>First Name</mat-label>
<input
matInput
placeholder="Jane"
formControlName="first_name"
name="first_name"
required />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Last Name</mat-label>
<input
matInput
placeholder="Doe"
formControlName="last_name"
name="last_name"
required />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>UNC Email</mat-label>
<input
matInput
type="email"
placeholder="[email protected]"
formControlName="email"
name="email"
required />
<mat-error *ngIf="profileForm.value.email"
>Must provide a valid UNC email address.</mat-error
>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Pronouns</mat-label>
<input
matInput
placeholder="she / her / hers"
formControlName="pronouns"
name="pronouns"
required />
</mat-form-field>
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button type="submit" [disabled]="profileForm.invalid">
Save
</button>
</mat-card-actions>
</mat-card>
</form>

<mat-card *ngIf="profile.id" appearance="outlined">
<div *ngIf="profile.github !== ''; else associate_github">
<mat-card-header>
<img mat-card-avatar [src]="profile.github_avatar" />
<mat-card-title>GitHub /
<a id="github_link" href="https://github.com/{{ profile.github }}" target="_blank">
{{ profile.github }}
</a></mat-card-title>
</mat-card-header>
<mat-card-actions>
<button mat-stroked-button (click)="unlinkGitHub()">Unlink GitHub</button>
</mat-card-actions>
</div>
<ng-template #associate_github>
<mat-card-header>
<mat-card-title>Link Your GitHub Account</mat-card-title>
</mat-card-header>
<mat-card-actions>
<button mat-stroked-button (click)="linkWithGitHub()">
Link with GitHub
</button>
</mat-card-actions>
</ng-template>
<div *ngIf="profile.github !== ''; else associate_github">
<mat-card-header>
<img mat-card-avatar [src]="profile.github_avatar" />
<mat-card-title
>GitHub /
<a
id="github_link"
href="https://github.com/{{ profile.github }}"
target="_blank">
{{ profile.github }}
</a></mat-card-title
>
</mat-card-header>
<mat-card-actions>
<button mat-stroked-button (click)="unlinkGitHub()">Unlink GitHub</button>
</mat-card-actions>
</div>
<ng-template #associate_github>
<mat-card-header>
<mat-card-title>Link Your GitHub Account</mat-card-title>
</mat-card-header>
<mat-card-actions>
<button mat-stroked-button (click)="linkWithGitHub()">
Link with GitHub
</button>
</mat-card-actions>
</ng-template>
</mat-card>

<mat-card *ngIf="profile.id" appearance="outlined">
Expand Down Expand Up @@ -104,4 +133,4 @@
<code>{{ token }}</code></mat-card-content
>
</div>
</mat-card>
</mat-card>

0 comments on commit 891b2bf

Please sign in to comment.