nuevo-grupo-parametros-eva.component.html 2.48 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<div class="contenedor">
  <div class="sobremontado">
    <span class="icono-instituciones material-icons">new_label</span>
    Agregar Opciones de Respuesta
    <button class="volver" (click)="volver()">
      <mat-icon>keyboard_arrow_left</mat-icon>
    </button>
  </div>
  <div class="contenedor-dos">
    <form [formGroup]="myForm" (ngSubmit)="onSubmit()" class="formulario">
      <div class="input-container">
        <mat-form-field class="example-full-width">
          <mat-label>Nombre:</mat-label>
          <input matInput formControlName="nombre" required >
          <mat-error *ngIf="myForm.get('nombre').invalid && (myForm.get('nombre').dirty || myForm.get('nombre').touched)">
            Por favor, ingrese el nombre.
          </mat-error>
        </mat-form-field>
      </div>
      <div class="input-container">
        <mat-form-field class="example-full-width">
          <mat-label>Descripción 1:</mat-label>
          <input matInput formControlName="descripcion1" required >
          <mat-error *ngIf="myForm.get('descripcion1').invalid && (myForm.get('descripcion1').dirty || myForm.get('descripcion1').touched)">
            Por favor, ingrese la descripción 1.
          </mat-error>
        </mat-form-field>
      </div>

      <div class="input-container">
        <mat-form-field class="example-full-width">
          <mat-label>Descripción 2:</mat-label>
          <input matInput formControlName="descripcion2" required >
          <mat-error *ngIf="myForm.get('descripcion2').invalid && (myForm.get('descripcion2').dirty || myForm.get('descripcion2').touched)">
            Por favor, ingrese la descripción 2.
          </mat-error>
        </mat-form-field>
      </div>      

      <div>
        <mat-form-field>
          <mat-label>Tipo</mat-label>
          <mat-select formControlName="tipo" required>
            <mat-option>--</mat-option>
            <mat-option *ngFor="let tipo of tipos" [value]="tipo">
              {{tipo.name}}
            </mat-option>
          </mat-select>
          <mat-error *ngIf="tiposParametrosF.hasError('required')">Seleccione un Tipo</mat-error>
        </mat-form-field>
      </div>
      <div>
        <button mat-raised-button color="primary" [disabled]="myForm.invalid" (click)="onSubmit()">Guardar</button>

      </div>
    </form>
  </div>
</div>