Skip to content

Commit 8d16530

Browse files
committed
fix: activity title data input
1 parent a394a6e commit 8d16530

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/app/transcribing-activity-configuration/transcribing-activity-configuration.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ <h3>Create a transcription activity</h3>
8888
>
8989
<md-outlined-text-field
9090
label="Title of activity"
91-
id="name"
91+
id="title"
9292
placeholder="title of activity"
9393
class="form-control"
9494
[value]="activityConfigurationForm.value.title"
95-
(change)="update_config('name', $event)"
95+
(change)="update_config('title', $event)"
9696
required
9797
></md-outlined-text-field>
9898

@@ -212,7 +212,7 @@ <h3>Create a transcription activity</h3>
212212
mat-button
213213
id="save_config"
214214
(click)="exportActivityConfiguration()"
215-
[disabled]="this.activityConfigurationForm.value.title.length < 3"
215+
[disabled]="activityConfigurationForm.value.title.length < 3"
216216
>
217217
Export Configuration
218218
</md-filled-button>
@@ -267,7 +267,7 @@ <h3>Create a transcription activity</h3>
267267
label="Data for this activity"
268268
id="activity_data"
269269
class="form-control"
270-
placeholder="data for the activity"
270+
placeholder="data for the activity (click add after each entry)"
271271
type="textarea"
272272
[value]="new_word"
273273
(change)="updateData($event)"

src/app/transcribing-activity-configuration/transcribing-activity-configuration.component.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export class TranscribingActivityConfigurationComponent {
189189
};
190190

191191
this.activityConfigurationForm.patchValue(patch);
192+
//console.log(this.activityConfigurationForm.value[key]);
192193
this.update_api_status();
193194
}
194195
update_duration($event: Event) {
@@ -255,7 +256,10 @@ export class TranscribingActivityConfigurationComponent {
255256
this.activityConfigurationForm.value.api
256257
);
257258
if (this.activityConfigurationForm.value.api.length)
258-
fetch(this.activityConfigurationForm.value.api, { method: 'OPTIONS' })
259+
fetch(this.activityConfigurationForm.value.api, {
260+
method: 'OPTIONS',
261+
headers: new Headers({ mode: 'no-cors' }),
262+
})
259263
.then(() => {
260264
this.api_is_reachable = true;
261265
this.toastr.success('API endpoint is reachable');

0 commit comments

Comments
 (0)