datasurvey/src/main/webapp/app/entities/p-pregunta-abierta/update/p-pregunta-abierta-update.c...

105 lines
4.9 KiB
HTML
Raw Normal View History

2021-07-03 21:48:27 +00:00
<div class="row justify-content-center">
<div class="col-8">
<form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
<h2
id="jhi-p-pregunta-abierta-heading"
data-cy="PPreguntaAbiertaCreateUpdateHeading"
jhiTranslate="dataSurveyApp.pPreguntaAbierta.home.createOrEditLabel"
>
Create or edit a P Pregunta Abierta
</h2>
<div>
<jhi-alert-error></jhi-alert-error>
<div class="form-group" [hidden]="editForm.get('id')!.value == null">
<label class="form-control-label" jhiTranslate="global.field.id" for="field_id">ID</label>
<input type="number" class="form-control" name="id" id="field_id" data-cy="id" formControlName="id" [readonly]="true" />
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="dataSurveyApp.pPreguntaAbierta.nombre" for="field_nombre">Nombre</label>
<input type="text" class="form-control" name="nombre" id="field_nombre" data-cy="nombre" formControlName="nombre" />
<div *ngIf="editForm.get('nombre')!.invalid && (editForm.get('nombre')!.dirty || editForm.get('nombre')!.touched)">
<small class="form-text text-danger" *ngIf="editForm.get('nombre')?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small
class="form-text text-danger"
*ngIf="editForm.get('nombre')?.errors?.minlength"
jhiTranslate="entity.validation.minlength"
[translateValues]="{ min: 1 }"
>
This field is required to be at least 1 characters.
</small>
<small
class="form-text text-danger"
*ngIf="editForm.get('nombre')?.errors?.maxlength"
jhiTranslate="entity.validation.maxlength"
[translateValues]="{ max: 500 }"
>
This field cannot be longer than 500 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="dataSurveyApp.pPreguntaAbierta.opcional" for="field_opcional">Opcional</label>
<input type="checkbox" class="form-check" name="opcional" id="field_opcional" data-cy="opcional" formControlName="opcional" />
<div *ngIf="editForm.get('opcional')!.invalid && (editForm.get('opcional')!.dirty || editForm.get('opcional')!.touched)">
<small
class="form-text text-danger"
*ngIf="editForm.get('opcional')?.errors?.required"
jhiTranslate="entity.validation.required"
>
This field is required.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="dataSurveyApp.pPreguntaAbierta.orden" for="field_orden">Orden</label>
<input type="number" class="form-control" name="orden" id="field_orden" data-cy="orden" formControlName="orden" />
<div *ngIf="editForm.get('orden')!.invalid && (editForm.get('orden')!.dirty || editForm.get('orden')!.touched)">
<small class="form-text text-danger" *ngIf="editForm.get('orden')?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger" [hidden]="!editForm.get('orden')?.errors?.number" jhiTranslate="entity.validation.number">
This field should be a number.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="dataSurveyApp.pPreguntaAbierta.plantilla" for="field_plantilla">Plantilla</label>
<select class="form-control" id="field_plantilla" data-cy="plantilla" name="plantilla" formControlName="plantilla">
<option [ngValue]="null"></option>
<option
[ngValue]="plantillaOption.id === editForm.get('plantilla')!.value?.id ? editForm.get('plantilla')!.value : plantillaOption"
*ngFor="let plantillaOption of plantillasSharedCollection; trackBy: trackPlantillaById"
>
{{ plantillaOption.id }}
</option>
</select>
</div>
</div>
<div>
<button type="button" id="cancel-save" data-cy="entityCreateCancelButton" class="btn btn-secondary" (click)="previousState()">
<fa-icon icon="ban"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
<button
type="submit"
id="save-entity"
data-cy="entityCreateSaveButton"
[disabled]="editForm.invalid || isSaving"
class="btn btn-primary"
>
<fa-icon icon="save"></fa-icon>&nbsp;<span jhiTranslate="entity.action.save">Save</span>
</button>
</div>
</form>
</div>
</div>