Skip to content

Commit

Permalink
Save entered text in abstract editor
Browse files Browse the repository at this point in the history
Text fields were not updating the content as `$event.target.value`
was missing.

This also fixed some bugs about how I lazily copied and pasted some
of the inputs around, so some fields were altering other ones.

Issue #262 (Edit abstracts as student user)
Epic #131 (Submission Card View)
  • Loading branch information
michael-small committed Feb 22, 2020
1 parent e050798 commit 4cdb3e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 8 additions & 12 deletions client/src/app/editAbstract/editAbstract.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2>This form is not about adding items. Any items changed are all that will sho
<mat-form-field class="presentationTitleBox" style="display: inline-block; width: 100%">
<textarea matInput #input
placeholder="New Presentation Title"
(input)="submission.presentationTitle"
(input)="submission.presentationTitle = $event.target.value"
rows="1"
cols="1"></textarea>
</mat-form-field>
Expand All @@ -18,7 +18,7 @@ <h2>This form is not about adding items. Any items changed are all that will sho
<mat-form-field style="display: inline-block; width: 100%">
<textarea matInput #input
placeholder="New Abstract"
(input)="submission.abstractContent"
(input)="submission.abstractContent = $event.target.value"
rows="1"
cols="1" class="presentationAbstractBox"></textarea>
</mat-form-field>
Expand Down Expand Up @@ -145,21 +145,17 @@ <h2>This form is not about adding items. Any items changed are all that will sho
<mat-checkbox (click)="newSponsor(2)" [checked]="this.submission.sponOrganization[2]">MMP</mat-checkbox>
<br>
<mat-checkbox (click)="newSponsor(3)" [checked]="this.submission.sponOrganization[3]">LSAMP</mat-checkbox>
<br>
<mat-checkbox (click)="newSponsor(4)" [checked]="this.submission.sponOrganization[4]">McNair</mat-checkbox>
</div>
<br>

<mat-form-field>
<textarea matInput placeholder="Other"
(input) = "submission.miscSponOrganization = $event.target.value" rows="1" cols="1">
</textarea>
</mat-form-field>

<div id="other-orgs">
<span><b>OTHER Organization(s): </b> {{submission.miscSponOrganization}}</span>
<mat-form-field class="presentationTitleBox" style="display: inline-block; width: 100%">
<textarea matInput #input
placeholder="New OTHER Organization(s):"
(input)="submission.miscSponOrganization"
(input)="submission.miscSponOrganization = $event.target.value"
rows="1"
cols="1"></textarea>
</mat-form-field>
Expand All @@ -186,7 +182,7 @@ <h2>This form is not about adding items. Any items changed are all that will sho
<mat-form-field class="presentationTitleBox" style="display: inline-block; width: 100%">
<textarea matInput #input
placeholder="New Media Services Equiptment Need"
(input)="submission.presentationTitle"
(input)="submission.additionalMediaEquipment = $event.target.value"
rows="1"
cols="1"></textarea>
</mat-form-field>
Expand All @@ -197,15 +193,15 @@ <h2>This form is not about adding items. Any items changed are all that will sho
<mat-form-field class="presentationTitleBox" style="display: inline-block; width: 100%">
<textarea matInput #input
placeholder="New Special Requirements Request:"
(input)="submission.additionalRequirements"
(input)="submission.additionalRequirements = $event.target.value"
rows="1"
cols="1"></textarea>
</mat-form-field>
</div>
</div>


<button mat-raised-button class="buttons" id="save-button">SAVE</button>
<button mat-raised-button class="buttons" id="save-button" (click)="saveAbstractEdit()">SAVE</button>
</div>


Expand Down
4 changes: 4 additions & 0 deletions client/src/app/editAbstract/editAbstract.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export class EditAbstractComponent implements OnInit {
);
}

saveAbstractEdit() {
console.log(this.submission);
}

ngOnInit() {
this.getSubmission();
}
Expand Down

0 comments on commit 4cdb3e7

Please sign in to comment.