2021-07-18 20:21:45 +00:00
|
|
|
<div>
|
|
|
|
<h2 id="page-heading" data-cy="EPreguntaCerradaHeading">
|
2021-07-23 03:34:05 +00:00
|
|
|
<p class="ds-title">{{ encuesta!.nombre }}</p>
|
|
|
|
<p class="ds-subtitle">Creada el día {{ encuesta!.fechaCreacion | formatShortDatetime | lowercase }}</p>
|
2021-07-18 20:21:45 +00:00
|
|
|
|
|
|
|
<div class="d-flex justify-content-end">
|
2021-07-23 03:34:05 +00:00
|
|
|
<button type="button" class="ds-btn ds-btn--secondary" (click)="previousState()">
|
|
|
|
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
|
2021-07-18 20:21:45 +00:00
|
|
|
</button>
|
2021-07-23 03:34:05 +00:00
|
|
|
<button type="button" class="ds-btn ds-btn--secondary" (click)="loadAll()" [disabled]="isLoading">
|
|
|
|
<fa-icon icon="sync" [spin]="isLoading"></fa-icon> <span>Refrescar preguntas</span>
|
2021-07-18 20:21:45 +00:00
|
|
|
</button>
|
2021-07-23 03:34:05 +00:00
|
|
|
<ng-container *ngIf="encuesta!.estado === 'DRAFT'">
|
|
|
|
<button type="button" class="ds-btn ds-btn--primary" (click)="publishSurvey()">Publicar encuesta</button>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="encuesta!.estado === 'ACTIVE'">
|
|
|
|
<button type="button" class="ds-btn ds-btn--danger--full" (click)="finishSurvey()">Finalizar encuesta</button>
|
|
|
|
</ng-container>
|
2021-07-18 20:21:45 +00:00
|
|
|
</div>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<jhi-alert-error></jhi-alert-error>
|
|
|
|
|
|
|
|
<jhi-alert></jhi-alert>
|
|
|
|
|
|
|
|
<div class="alert alert-warning" id="no-result" *ngIf="ePreguntas?.length === 0">
|
|
|
|
<span>No se encontraron preguntas</span>
|
|
|
|
</div>
|
|
|
|
|
2021-07-23 03:34:05 +00:00
|
|
|
<div class="ds-survey" id="entities" *ngIf="ePreguntas && ePreguntas.length > 0">
|
|
|
|
<div class="ds-survey--all-question-wrapper">
|
|
|
|
<div class="ds-survey--question-wrapper" *ngFor="let ePregunta of ePreguntas; let i = index; trackBy: trackId">
|
|
|
|
<div
|
|
|
|
[attr.data-index]="ePregunta.id"
|
|
|
|
[attr.data-tipo]="ePregunta.tipo"
|
|
|
|
[attr.data-opcional]="ePregunta.opcional"
|
|
|
|
class="ds-survey--question"
|
|
|
|
>
|
|
|
|
<div class="ds-survey--titulo">
|
|
|
|
<span class="ds-survey--titulo--name">{{ i + 1 }}. {{ ePregunta.nombre }}</span>
|
|
|
|
<fa-icon
|
2021-07-23 03:49:13 +00:00
|
|
|
*ngIf="encuesta!.estado === 'DRAFT'"
|
2021-07-23 03:34:05 +00:00
|
|
|
class="ds-survey--titulo--icon"
|
|
|
|
[icon]="faTimes"
|
|
|
|
(click)="deleteQuestion($event)"
|
|
|
|
[attr.data-id]="ePregunta.id"
|
|
|
|
[attr.data-type]="ePregunta.tipo"
|
|
|
|
></fa-icon>
|
|
|
|
</div>
|
2021-07-23 07:00:40 +00:00
|
|
|
<div>
|
|
|
|
<span *ngIf="ePregunta.tipo === 'SINGLE'" class="ds-subtitle"
|
|
|
|
>Pregunta de respuesta {{ 'dataSurveyApp.PreguntaCerradaTipo.SINGLE' | translate | lowercase }}</span
|
|
|
|
>
|
|
|
|
<span *ngIf="ePregunta.tipo === 'MULTIPLE'" class="ds-subtitle"
|
|
|
|
>Pregunta de respuesta {{ 'dataSurveyApp.PreguntaCerradaTipo.MULTIPLE' | translate | lowercase }}</span
|
|
|
|
>
|
|
|
|
<span *ngIf="!ePregunta.tipo" class="ds-subtitle">Pregunta de respuesta abierta</span>
|
|
|
|
</div>
|
2021-07-23 03:34:05 +00:00
|
|
|
<ng-container *ngIf="ePregunta.tipo">
|
|
|
|
<ng-container *ngFor="let ePreguntaOpcion of ePreguntasOpciones; let j = index; trackBy: trackId">
|
|
|
|
<ng-container *ngIf="ePregunta.id == ePreguntaOpcion[j].epreguntaCerrada.id">
|
|
|
|
<div
|
2021-07-23 07:00:40 +00:00
|
|
|
class="ds-survey--option ds-survey--option--base ds-survey--closed-option"
|
2021-07-23 03:34:05 +00:00
|
|
|
*ngFor="let ePreguntaOpcion2 of ePreguntaOpcion; let k = index; trackBy: trackId"
|
|
|
|
[attr.data-id]="ePreguntaOpcion2.id"
|
|
|
|
>
|
2021-07-23 07:00:40 +00:00
|
|
|
<!-- <input class="ds-survey--checkbox" id="{{ ePregunta.id }}-{{ ePreguntaOpcion2.id }}" type="checkbox" disabled /> -->
|
2021-07-23 03:34:05 +00:00
|
|
|
<label for="{{ ePregunta.id }}-{{ ePreguntaOpcion2.id }}">{{ ePreguntaOpcion2.nombre }}</label>
|
2021-07-23 07:20:43 +00:00
|
|
|
<fa-icon
|
|
|
|
*ngIf="encuesta!.estado === 'DRAFT'"
|
|
|
|
class="ds-survey--titulo--icon ds-survey--titulo--icon--small"
|
|
|
|
[icon]="faTimes"
|
|
|
|
(click)="deleteOption($event)"
|
|
|
|
[attr.data-optionid]="ePreguntaOpcion2.id"
|
|
|
|
></fa-icon>
|
2021-07-23 03:34:05 +00:00
|
|
|
</div>
|
|
|
|
</ng-container>
|
2021-07-18 20:21:45 +00:00
|
|
|
</ng-container>
|
2021-07-23 07:00:40 +00:00
|
|
|
<div
|
|
|
|
class="ds-survey--option ds-survey--option--add ds-survey--closed-option"
|
|
|
|
(click)="resetForm($event)"
|
|
|
|
data-toggle="modal"
|
|
|
|
data-target="#crearOpcion"
|
|
|
|
[attr.data-id]="ePregunta.id"
|
|
|
|
>
|
|
|
|
<fa-icon
|
|
|
|
class="ds-survey--add-option--icon"
|
|
|
|
[icon]="faPlus"
|
|
|
|
[attr.data-id]="ePregunta.id"
|
|
|
|
[attr.data-type]="ePregunta.tipo"
|
|
|
|
></fa-icon>
|
|
|
|
<span class="ds-survey--add-option">Añadir pregunta</span>
|
|
|
|
</div>
|
2021-07-18 20:21:45 +00:00
|
|
|
</ng-container>
|
2021-07-23 07:00:40 +00:00
|
|
|
<div class="ds-survey--option ds-survey--option--base ds-survey--open-option" *ngIf="!ePregunta.tipo">
|
2021-07-23 03:34:05 +00:00
|
|
|
<textarea name="" id="" cols="30" rows="10" disabled></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-18 20:21:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-23 03:34:05 +00:00
|
|
|
|
2021-07-18 20:21:45 +00:00
|
|
|
<!-- <table class="table table-striped" aria-describedby="page-heading">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col"><span jhiTranslate="global.field.id">ID</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.nombre">Nombre</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.tipo">Tipo</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.opcional">Opcional</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.orden">Orden</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.encuesta">Encuesta</span></th>
|
|
|
|
<th scope="col"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let ePreguntaCerrada of ePreguntaCerradas; trackBy: trackId" data-cy="entityTable">
|
|
|
|
<td>
|
|
|
|
<a [routerLink]="['/e-pregunta-cerrada', ePreguntaCerrada.id, 'view']">{{ ePreguntaCerrada.id }}</a>
|
|
|
|
</td>
|
|
|
|
<td>{{ ePreguntaCerrada.nombre }}</td>
|
|
|
|
<td *ngIf="ePreguntaCerrada.tipo != undefined" jhiTranslate="{{ 'dataSurveyApp.PreguntaCerradaTipo.' + ePreguntaCerrada.tipo }}">{{ ePreguntaCerrada.tipo }}</td>
|
|
|
|
<td *ngIf="ePreguntaCerrada.tipo == undefined"></td>
|
|
|
|
|
|
|
|
<td>{{ ePreguntaCerrada.opcional }}</td>
|
|
|
|
<td>{{ ePreguntaCerrada.orden }}</td>
|
|
|
|
<td>
|
|
|
|
<div *ngIf="ePreguntaCerrada.encuesta">
|
|
|
|
<a [routerLink]="['/encuesta', ePreguntaCerrada.encuesta?.id, 'view']">{{ ePreguntaCerrada.encuesta?.id }}</a>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
[routerLink]="['/e-pregunta-cerrada', ePreguntaCerrada.id, 'view']"
|
|
|
|
class="btn btn-info btn-sm"
|
|
|
|
data-cy="entityDetailsButton"
|
|
|
|
>
|
|
|
|
<fa-icon icon="eye"></fa-icon>
|
|
|
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
[routerLink]="['/e-pregunta-cerrada', ePreguntaCerrada.id, 'edit']"
|
|
|
|
class="btn btn-primary btn-sm"
|
|
|
|
data-cy="entityEditButton"
|
|
|
|
>
|
|
|
|
<fa-icon icon="pencil-alt"></fa-icon>
|
|
|
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button type="submit" (click)="delete(ePreguntaCerrada)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
|
|
|
|
<fa-icon icon="times"></fa-icon>
|
|
|
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-23 07:00:40 +00:00
|
|
|
<!-- Modal -->
|
|
|
|
<div class="modal fade ds-modal" id="crearOpcion" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
|
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<form autocomplete="off" class="ds-form" name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h1 class="modal-title" id="exampleModalLongTitle">Crear Opción</h1>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<!-- Survey Closed Question Create Option Modal -->
|
|
|
|
<div>
|
|
|
|
<jhi-alert-error></jhi-alert-error>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.ePreguntaCerradaOpcion.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>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<input id="createAnother" type="checkbox" (change)="createAnotherChange($event)" />
|
|
|
|
<label for="createAnother">Crear otra</label>
|
|
|
|
<button id="cancelBtn" type="button" class="ds-btn ds-btn--secondary" data-dismiss="modal">
|
|
|
|
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
id="save-entity"
|
|
|
|
data-cy="entityCreateSaveButton"
|
|
|
|
class="ds-btn ds-btn--primary"
|
|
|
|
[disabled]="editForm.invalid || isSaving"
|
|
|
|
>
|
|
|
|
<span jhiTranslate="entity.action.create">Create</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ------------------------------------------------------------------------------------------------- -->
|
|
|
|
|
2021-07-18 20:21:45 +00:00
|
|
|
<!-- <div class="row justify-content-center">
|
2021-07-03 21:48:27 +00:00
|
|
|
<div class="col-8">
|
|
|
|
<form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
|
|
|
|
<h2 id="jhi-encuesta-heading" data-cy="EncuestaCreateUpdateHeading" jhiTranslate="dataSurveyApp.encuesta.home.createOrEditLabel">
|
|
|
|
Create or edit a Encuesta
|
|
|
|
</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.encuesta.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: 50 }"
|
|
|
|
>
|
|
|
|
This field cannot be longer than 50 characters.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.descripcion" for="field_descripcion">Descripcion</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="descripcion"
|
|
|
|
id="field_descripcion"
|
|
|
|
data-cy="descripcion"
|
|
|
|
formControlName="descripcion"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaCreacion" for="field_fechaCreacion"
|
|
|
|
>Fecha Creacion</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaCreacion"
|
|
|
|
data-cy="fechaCreacion"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaCreacion"
|
|
|
|
formControlName="fechaCreacion"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
*ngIf="
|
|
|
|
editForm.get('fechaCreacion')!.invalid && (editForm.get('fechaCreacion')!.dirty || editForm.get('fechaCreacion')!.touched)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
*ngIf="editForm.get('fechaCreacion')?.errors?.required"
|
|
|
|
jhiTranslate="entity.validation.required"
|
|
|
|
>
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
[hidden]="!editForm.get('fechaCreacion')?.errors?.ZonedDateTimelocal"
|
|
|
|
jhiTranslate="entity.validation.ZonedDateTimelocal"
|
|
|
|
>
|
|
|
|
This field should be a date and time.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaPublicacion" for="field_fechaPublicacion"
|
|
|
|
>Fecha Publicacion</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaPublicacion"
|
|
|
|
data-cy="fechaPublicacion"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaPublicacion"
|
|
|
|
formControlName="fechaPublicacion"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaFinalizar" for="field_fechaFinalizar"
|
|
|
|
>Fecha Finalizar</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaFinalizar"
|
|
|
|
data-cy="fechaFinalizar"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaFinalizar"
|
|
|
|
formControlName="fechaFinalizar"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaFinalizada" for="field_fechaFinalizada"
|
|
|
|
>Fecha Finalizada</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaFinalizada"
|
|
|
|
data-cy="fechaFinalizada"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaFinalizada"
|
|
|
|
formControlName="fechaFinalizada"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.calificacion" for="field_calificacion">Calificacion</label>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
name="calificacion"
|
|
|
|
id="field_calificacion"
|
|
|
|
data-cy="calificacion"
|
|
|
|
formControlName="calificacion"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
*ngIf="editForm.get('calificacion')!.invalid && (editForm.get('calificacion')!.dirty || editForm.get('calificacion')!.touched)"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
*ngIf="editForm.get('calificacion')?.errors?.required"
|
|
|
|
jhiTranslate="entity.validation.required"
|
|
|
|
>
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
[hidden]="!editForm.get('calificacion')?.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.encuesta.acceso" for="field_acceso">Acceso</label>
|
|
|
|
<select class="form-control" name="acceso" formControlName="acceso" id="field_acceso" data-cy="acceso">
|
|
|
|
<option [ngValue]="null">{{ 'dataSurveyApp.AccesoEncuesta.null' | translate }}</option>
|
|
|
|
<option value="PUBLIC">{{ 'dataSurveyApp.AccesoEncuesta.PUBLIC' | translate }}</option>
|
|
|
|
<option value="PRIVATE">{{ 'dataSurveyApp.AccesoEncuesta.PRIVATE' | translate }}</option>
|
|
|
|
</select>
|
|
|
|
<div *ngIf="editForm.get('acceso')!.invalid && (editForm.get('acceso')!.dirty || editForm.get('acceso')!.touched)">
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('acceso')?.errors?.required" jhiTranslate="entity.validation.required">
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.contrasenna" for="field_contrasenna">Contrasenna</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="contrasenna"
|
|
|
|
id="field_contrasenna"
|
|
|
|
data-cy="contrasenna"
|
|
|
|
formControlName="contrasenna"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.estado" for="field_estado">Estado</label>
|
|
|
|
<select class="form-control" name="estado" formControlName="estado" id="field_estado" data-cy="estado">
|
|
|
|
<option [ngValue]="null">{{ 'dataSurveyApp.EstadoEncuesta.null' | translate }}</option>
|
|
|
|
<option value="DRAFT">{{ 'dataSurveyApp.EstadoEncuesta.DRAFT' | translate }}</option>
|
|
|
|
<option value="ACTIVE">{{ 'dataSurveyApp.EstadoEncuesta.ACTIVE' | translate }}</option>
|
|
|
|
<option value="FINISHED">{{ 'dataSurveyApp.EstadoEncuesta.FINISHED' | translate }}</option>
|
|
|
|
<option value="DELETED">{{ 'dataSurveyApp.EstadoEncuesta.DELETED' | translate }}</option>
|
|
|
|
</select>
|
|
|
|
<div *ngIf="editForm.get('estado')!.invalid && (editForm.get('estado')!.dirty || editForm.get('estado')!.touched)">
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('estado')?.errors?.required" jhiTranslate="entity.validation.required">
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.categoria" for="field_categoria">Categoria</label>
|
|
|
|
<select class="form-control" id="field_categoria" data-cy="categoria" name="categoria" formControlName="categoria">
|
|
|
|
<option [ngValue]="null"></option>
|
|
|
|
<option
|
|
|
|
[ngValue]="categoriaOption.id === editForm.get('categoria')!.value?.id ? editForm.get('categoria')!.value : categoriaOption"
|
|
|
|
*ngFor="let categoriaOption of categoriasSharedCollection; trackBy: trackCategoriaById"
|
|
|
|
>
|
|
|
|
{{ categoriaOption.nombre }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.usuarioExtra" for="field_usuarioExtra"
|
|
|
|
>Usuario Extra</label
|
|
|
|
>
|
|
|
|
<select class="form-control" id="field_usuarioExtra" data-cy="usuarioExtra" name="usuarioExtra" formControlName="usuarioExtra">
|
|
|
|
<option [ngValue]="null"></option>
|
|
|
|
<option
|
|
|
|
[ngValue]="
|
|
|
|
usuarioExtraOption.id === editForm.get('usuarioExtra')!.value?.id ? editForm.get('usuarioExtra')!.value : usuarioExtraOption
|
|
|
|
"
|
|
|
|
*ngFor="let usuarioExtraOption of usuarioExtrasSharedCollection; trackBy: trackUsuarioExtraById"
|
|
|
|
>
|
|
|
|
{{ usuarioExtraOption.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> <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> <span jhiTranslate="entity.action.save">Save</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2021-07-18 20:21:45 +00:00
|
|
|
</div> -->
|