2021-07-14 08:09:48 +00:00
|
|
|
<div class="row justify-content-center ds-form">
|
2021-07-15 01:55:21 +00:00
|
|
|
<div class="row w-75 mb-4" style="border-bottom: 1px solid #e7ebf3">
|
2021-07-14 08:09:48 +00:00
|
|
|
<div class="col-lg-10 mr-lg-5">
|
|
|
|
<div class="row">
|
|
|
|
<div class="w-100">
|
2021-07-19 04:40:47 +00:00
|
|
|
<p class="ds-title">Configuración</p>
|
2021-07-03 21:48:27 +00:00
|
|
|
</div>
|
2021-07-14 08:09:48 +00:00
|
|
|
<div>
|
2021-07-19 04:40:47 +00:00
|
|
|
<p class="ds-subtitle">Configuración de parámetros de DataSurvey.</p>
|
2021-07-03 21:48:27 +00:00
|
|
|
</div>
|
2021-07-14 08:09:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-15 01:55:21 +00:00
|
|
|
<div class="row w-75">
|
|
|
|
<div class="w-100 alert alert-danger" *ngIf="minDiasIncorrect">
|
|
|
|
La cantidad mínima de los días, debe ser inferior a la cantidad máxima
|
|
|
|
</div>
|
|
|
|
<div class="w-100 alert alert-danger" *ngIf="minPreguntasIncorrect">
|
|
|
|
La cantidad mínima de las preguntas, debe ser inferior a la cantidad máxima
|
|
|
|
</div>
|
|
|
|
<div class="w-100 alert alert-danger" *ngIf="notNumbers">Los valores digitadas deben ser numéricas y enteras</div>
|
|
|
|
<div class="w-100 alert alert-danger" *ngIf="notPositive">Los valores ingresados deben ser mayores que 0</div>
|
|
|
|
</div>
|
2021-07-14 08:09:48 +00:00
|
|
|
</div>
|
2021-07-03 21:48:27 +00:00
|
|
|
|
2021-07-14 08:09:48 +00:00
|
|
|
<!-- Form -->
|
|
|
|
<form
|
|
|
|
autocomplete="off"
|
|
|
|
class="ds-form row justify-content-center"
|
|
|
|
name="editForm"
|
|
|
|
role="form"
|
|
|
|
novalidate
|
|
|
|
(ngSubmit)="save()"
|
|
|
|
[formGroup]="editForm"
|
|
|
|
>
|
|
|
|
<div class="row w-75 pb-lg-5 pr-lg-5 mb-5" style="border-bottom: 1px solid #e7ebf3">
|
|
|
|
<div class="col-lg-4 mr-lg-5">
|
|
|
|
<div class="row">
|
|
|
|
<div class="w-100">
|
2021-07-19 04:40:47 +00:00
|
|
|
<p class="ds-title">Duración de una encuesta</p>
|
2021-07-14 08:09:48 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2021-07-19 04:40:47 +00:00
|
|
|
<p class="ds-subtitle">Configurar la duración mínima y máxima para las encuestas publicadas</p>
|
2021-07-14 08:09:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg ml-lg-5 mr-lg-5 pr-lg-5">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="form-group w-100">
|
|
|
|
<label class="form-control-label" for="field_minDiasEncuesta">Cantidad mínima</label>
|
2021-07-03 21:48:27 +00:00
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
name="minDiasEncuesta"
|
|
|
|
id="field_minDiasEncuesta"
|
|
|
|
data-cy="minDiasEncuesta"
|
|
|
|
formControlName="minDiasEncuesta"
|
2021-07-15 01:55:21 +00:00
|
|
|
min="1"
|
2021-07-03 21:48:27 +00:00
|
|
|
/>
|
|
|
|
<div
|
|
|
|
*ngIf="
|
|
|
|
editForm.get('minDiasEncuesta')!.invalid &&
|
|
|
|
(editForm.get('minDiasEncuesta')!.dirty || editForm.get('minDiasEncuesta')!.touched)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
2021-07-19 06:51:15 +00:00
|
|
|
*ngIf="
|
|
|
|
(editForm.get('minDiasEncuesta')?.errors?.pattern || editForm.get('minDiasEncuesta')?.errors?.required) &&
|
|
|
|
!editForm.get('minDiasEncuesta')?.errors?.max
|
|
|
|
"
|
2021-07-19 04:40:47 +00:00
|
|
|
jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
|
2021-07-03 21:48:27 +00:00
|
|
|
>
|
|
|
|
This field is required.
|
|
|
|
</small>
|
2021-07-19 04:40:47 +00:00
|
|
|
|
2021-07-19 06:51:15 +00:00
|
|
|
<!--<small
|
2021-07-03 21:48:27 +00:00
|
|
|
class="form-text text-danger"
|
2021-07-19 06:51:15 +00:00
|
|
|
*ngIf="editForm.get('minDiasEncuesta')?.errors?.required "
|
|
|
|
jhiTranslate="dataSurveyApp.parametroAplicacion.vacio"
|
2021-07-03 21:48:27 +00:00
|
|
|
>
|
2021-07-19 06:51:15 +00:00
|
|
|
This field is required.
|
|
|
|
</small>-->
|
|
|
|
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('minDiasEncuesta')?.errors?.min">
|
|
|
|
Este campo debe ser mayor o igual a 1
|
|
|
|
</small>
|
|
|
|
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('minDiasEncuesta')?.errors?.max">
|
|
|
|
Este campo debe ser menor o igual a 14
|
2021-07-03 21:48:27 +00:00
|
|
|
</small>
|
|
|
|
</div>
|
2021-07-15 01:55:21 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group w-100">
|
|
|
|
<label class="form-control-label" for="field_maxDiasEncuesta">Cantidad máxima</label>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
name="maxDiasEncuesta"
|
|
|
|
id="field_maxDiasEncuesta"
|
|
|
|
data-cy="maxDiasEncuesta"
|
|
|
|
formControlName="maxDiasEncuesta"
|
|
|
|
min="1"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
class="my-0"
|
|
|
|
*ngIf="
|
|
|
|
editForm.get('maxDiasEncuesta')!.invalid &&
|
|
|
|
(editForm.get('maxDiasEncuesta')!.dirty || editForm.get('maxDiasEncuesta')!.touched)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
2021-07-19 06:51:15 +00:00
|
|
|
*ngIf="
|
|
|
|
(editForm.get('maxDiasEncuesta')?.errors?.pattern || editForm.get('maxDiasEncuesta')?.errors?.required) &&
|
|
|
|
!editForm.get('maxDiasEncuesta')?.errors?.max
|
|
|
|
"
|
2021-07-19 04:40:47 +00:00
|
|
|
jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
|
2021-07-10 04:04:32 +00:00
|
|
|
>
|
2021-07-15 01:55:21 +00:00
|
|
|
This field is required.
|
|
|
|
</small>
|
2021-07-19 04:40:47 +00:00
|
|
|
|
2021-07-19 06:51:15 +00:00
|
|
|
<!--small
|
2021-07-15 01:55:21 +00:00
|
|
|
class="form-text text-danger"
|
2021-07-19 06:51:15 +00:00
|
|
|
*ngIf="editForm.get('maxDiasEncuesta')?.errors?.required "
|
|
|
|
jhiTranslate="dataSurveyApp.parametroAplicacion.vacio"
|
2021-07-15 01:55:21 +00:00
|
|
|
>
|
2021-07-19 06:51:15 +00:00
|
|
|
This field is required.
|
|
|
|
</small>-->
|
|
|
|
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('maxDiasEncuesta')?.errors?.min">
|
|
|
|
Este campo debe ser mayor o igual a 1
|
|
|
|
</small>
|
|
|
|
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('maxDiasEncuesta')?.errors?.max">
|
|
|
|
Este campo debe ser menor o igual a 14
|
2021-07-15 01:55:21 +00:00
|
|
|
</small>
|
2021-07-10 04:04:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-14 08:09:48 +00:00
|
|
|
|
|
|
|
<div class="row w-75 pb-lg-5 pr-lg-5 mb-5" style="border-bottom: 1px solid #e7ebf3">
|
|
|
|
<div class="col-lg-4 mr-lg-5">
|
|
|
|
<div class="row">
|
|
|
|
<div class="w-100">
|
2021-07-19 04:40:47 +00:00
|
|
|
<p class="ds-title">Cantidad de preguntas</p>
|
2021-07-14 08:09:48 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2021-07-19 04:40:47 +00:00
|
|
|
<p class="ds-subtitle">Configurar la cantidad mínima y máxima de preguntas por encuesta</p>
|
2021-07-14 08:09:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-10 04:04:32 +00:00
|
|
|
</div>
|
2021-07-14 08:09:48 +00:00
|
|
|
<div class="col-lg ml-lg-5 mr-lg-5 pr-lg-5">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="form-group w-100">
|
|
|
|
<label class="form-control-label" for="field_minCantidadPreguntas">Cantidad mínima</label>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
name="minCantidadPreguntas"
|
|
|
|
id="field_minCantidadPreguntas"
|
|
|
|
data-cy="minCantidadPreguntas"
|
|
|
|
formControlName="minCantidadPreguntas"
|
2021-07-15 01:55:21 +00:00
|
|
|
min="1"
|
2021-07-14 08:09:48 +00:00
|
|
|
/>
|
|
|
|
<div
|
|
|
|
*ngIf="
|
|
|
|
editForm.get('minCantidadPreguntas')!.invalid &&
|
|
|
|
(editForm.get('minCantidadPreguntas')!.dirty || editForm.get('minCantidadPreguntas')!.touched)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
2021-07-19 06:51:15 +00:00
|
|
|
*ngIf="
|
|
|
|
(editForm.get('minCantidadPreguntas')?.errors?.required || !editForm.get('minCantidadPreguntas')?.errors?.pattern) &&
|
|
|
|
!(editForm.get('minCantidadPreguntas')?.errors?.max || editForm.get('minCantidadPreguntas')?.errors?.min)
|
|
|
|
"
|
2021-07-19 04:40:47 +00:00
|
|
|
jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
|
2021-07-10 04:04:32 +00:00
|
|
|
>
|
2021-07-14 08:09:48 +00:00
|
|
|
This field is required.
|
|
|
|
</small>
|
2021-07-19 04:40:47 +00:00
|
|
|
|
2021-07-19 06:51:15 +00:00
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('minCantidadPreguntas')?.errors?.min">
|
|
|
|
Este campo debe ser mayor o igual a 1
|
|
|
|
</small>
|
|
|
|
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('minCantidadPreguntas')?.errors?.max">
|
|
|
|
Este campo debe ser menor o igual a 40
|
2021-07-14 08:09:48 +00:00
|
|
|
</small>
|
2021-07-10 04:04:32 +00:00
|
|
|
</div>
|
2021-07-15 01:55:21 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group w-100">
|
|
|
|
<label class="form-control-label" for="field_maxCantidadPreguntas">Cantidad máxima</label>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
name="maxCantidadPreguntas"
|
|
|
|
id="field_maxCantidadPreguntas"
|
|
|
|
data-cy="maxCantidadPreguntas"
|
|
|
|
formControlName="maxCantidadPreguntas"
|
|
|
|
min="1"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
*ngIf="
|
|
|
|
editForm.get('maxCantidadPreguntas')!.invalid &&
|
|
|
|
(editForm.get('maxCantidadPreguntas')!.dirty || editForm.get('maxCantidadPreguntas')!.touched)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
2021-07-19 06:51:15 +00:00
|
|
|
*ngIf="
|
|
|
|
(editForm.get('maxCantidadPreguntas')?.errors?.required || !editForm.get('maxCantidadPreguntas')?.errors?.pattern) &&
|
|
|
|
!(editForm.get('maxCantidadPreguntas')?.errors?.max || editForm.get('maxCantidadPreguntas')?.errors?.min)
|
|
|
|
"
|
2021-07-19 04:40:47 +00:00
|
|
|
jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
|
2021-07-15 01:55:21 +00:00
|
|
|
>
|
|
|
|
This field is required.
|
|
|
|
</small>
|
2021-07-19 04:40:47 +00:00
|
|
|
|
2021-07-19 06:51:15 +00:00
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('maxCantidadPreguntas')?.errors?.min">
|
|
|
|
Este campo debe ser mayor o igual a 1
|
|
|
|
</small>
|
|
|
|
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('maxCantidadPreguntas')?.errors?.max">
|
|
|
|
Este campo debe ser menor o igual a 40
|
2021-07-15 01:55:21 +00:00
|
|
|
</small>
|
2021-07-10 04:04:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-14 08:09:48 +00:00
|
|
|
<div class="row">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
id="cancel-save"
|
|
|
|
data-cy="entityCreateCancelButton"
|
|
|
|
class="ds-btn ds-btn--secondary"
|
|
|
|
(click)="previousState()"
|
|
|
|
>
|
|
|
|
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
|
|
|
|
</button>
|
2021-07-10 04:04:32 +00:00
|
|
|
|
2021-07-14 08:09:48 +00:00
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
id="save-entity"
|
|
|
|
data-cy="entityCreateSaveButton"
|
|
|
|
[disabled]="editForm.invalid || isSaving"
|
|
|
|
class="ds-btn ds-btn--primary"
|
|
|
|
>
|
|
|
|
<span jhiTranslate="entity.action.save">Save</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-07-10 04:04:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|