Files
codiki-hexagonal/frontend/src/app/components/publication-edition/code-block-dialog/code-block-dialog.component.html
2024-10-21 15:15:53 +02:00

33 lines
1.2 KiB
HTML

<button type="button" class="close" (click)="closeDialog()" matRipple>
<mat-icon>close</mat-icon>
</button>
<header>
<h1 i18n>Add a code block</h1>
</header>
<form [formGroup]="formGroup" (submit)="closeAndValidate()" class="cod-form" ngNativeValidate>
<div class="form-content">
<mat-form-field>
<mat-label i18n>Programming language</mat-label>
<mat-select #programmingLanguageSelect formControlName="programmingLanguage">
@for(programmingLanguage of programmingLanguages; track programmingLanguage) {
<mat-option [value]="programmingLanguage.code">
{{programmingLanguage.label}}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label i18n>Code block</mat-label>
<textarea matInput formControlName="codeBlock"></textarea>
</mat-form-field>
</div>
<div class="actions reversed">
<button type="submit" class="cod-btn" matRipple i18n>
Validate
</button>
<button type="button" (click)="closeDialog()" class="cod-btn secondary" matRipple i18n>
Cancel
</button>
</div>
</form>