Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Deleting experiment using 'delete' keyword #175

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
matInput
class="ft-14-400 name-input"
[placeholder]="'home.delete-experiment.input-placeholder.text' | translate"
[(ngModel)]="expName"
[(ngModel)]="deleteConfirm"
/>
</mat-form-field>
</div>
Expand All @@ -22,8 +22,8 @@
<button
class="modal-btn default-button delete-btn"
mat-flat-button
[ngClass]="{ 'default-button--disabled': expName !== data.experimentName }"
[disabled]="expName !== data.experimentName"
[ngClass]="{ 'default-button--disabled': deleteConfirm !== ('home.delete-experiment.delete.text' | translate) }"
[disabled]="deleteConfirm !== ('home.delete-experiment.delete.text' | translate)"
(click)="deleteExperiment()"
>
{{ 'global.delete.text' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ExperimentService } from '../../../../../../core/experiments/experiment
})
export class DeleteExperimentComponent {

expName: string;
deleteConfirm: string;
constructor(
private experimentService: ExperimentService,
public dialogRef: MatDialogRef<DeleteExperimentComponent>,
Expand Down
5 changes: 3 additions & 2 deletions projects/abtesting/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@
"home.view-experiment.graph-partitions.text": "Sites",
"home.view-experiment.graph-time.text": "Time",
"home.view-experiment.graph-select-all.text": "Select All",
"home.delete-experiment.message.text": "Type the name of experiment to confirm deletion:",
"home.delete-experiment.message.text": "Type 'delete' to confirm deletion:",
"home.delete-experiment.delete.text": "delete",
"home.import-experiment.message.text": "Select the JSON to import experiment:",
"home.import-experiment.error.message.text": "Invalid Experiment JSON data",
"home.delete-experiment.input-placeholder.text": "Experiment name",
"home.delete-experiment.input-placeholder.text": "Type delete",
"home.change-experiment-status.title.text": "Change Experiment Status",
"home.change-experiment-status.current-status.text": "Current Status",
"home.change-experiment-status.new-status.text": "New Status",
Expand Down