254 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			254 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
<div class="row justify-content-center ds-form">
 | 
						|
  <div class="row w-75">
 | 
						|
    <!-- <h2 id="page-heading" data-cy="EncuestaHeading">
 | 
						|
      <div class="d-flex flex-sm-row flex-column justify-content-between align-items-center">
 | 
						|
        <div>
 | 
						|
          <span class="ds-title">Configuración</span>
 | 
						|
          <p class="ds-subtitle">Configure los parámetros de encuestas de DataSurvey</p>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </h2> -->
 | 
						|
 | 
						|
    <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>
 | 
						|
</div>
 | 
						|
 | 
						|
<!-- 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">
 | 
						|
          <p class="ds-title">Duración de una encuesta</p>
 | 
						|
        </div>
 | 
						|
        <div>
 | 
						|
          <p class="ds-subtitle">Configurar la duración mínima y máxima para las encuestas publicadas</p>
 | 
						|
        </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>
 | 
						|
          <input
 | 
						|
            type="number"
 | 
						|
            class="form-control"
 | 
						|
            name="minDiasEncuesta"
 | 
						|
            id="field_minDiasEncuesta"
 | 
						|
            data-cy="minDiasEncuesta"
 | 
						|
            formControlName="minDiasEncuesta"
 | 
						|
            min="1"
 | 
						|
          />
 | 
						|
          <div
 | 
						|
            *ngIf="
 | 
						|
              editForm.get('minDiasEncuesta')!.invalid &&
 | 
						|
              (editForm.get('minDiasEncuesta')!.dirty || editForm.get('minDiasEncuesta')!.touched)
 | 
						|
            "
 | 
						|
          >
 | 
						|
            <small
 | 
						|
              class="form-text text-danger"
 | 
						|
              *ngIf="
 | 
						|
                (editForm.get('minDiasEncuesta')?.errors?.pattern || editForm.get('minDiasEncuesta')?.errors?.required) &&
 | 
						|
                !editForm.get('minDiasEncuesta')?.errors?.max
 | 
						|
              "
 | 
						|
              jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
 | 
						|
            >
 | 
						|
              This field is required.
 | 
						|
            </small>
 | 
						|
 | 
						|
            <!--<small
 | 
						|
              class="form-text text-danger"
 | 
						|
              *ngIf="editForm.get('minDiasEncuesta')?.errors?.required "
 | 
						|
              jhiTranslate="dataSurveyApp.parametroAplicacion.vacio"
 | 
						|
            >
 | 
						|
              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
 | 
						|
            </small>
 | 
						|
          </div>
 | 
						|
        </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"
 | 
						|
              *ngIf="
 | 
						|
                (editForm.get('maxDiasEncuesta')?.errors?.pattern || editForm.get('maxDiasEncuesta')?.errors?.required) &&
 | 
						|
                !editForm.get('maxDiasEncuesta')?.errors?.max
 | 
						|
              "
 | 
						|
              jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
 | 
						|
            >
 | 
						|
              This field is required.
 | 
						|
            </small>
 | 
						|
 | 
						|
            <!--small
 | 
						|
              class="form-text text-danger"
 | 
						|
              *ngIf="editForm.get('maxDiasEncuesta')?.errors?.required "
 | 
						|
              jhiTranslate="dataSurveyApp.parametroAplicacion.vacio"
 | 
						|
            >
 | 
						|
              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
 | 
						|
            </small>
 | 
						|
          </div>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
 | 
						|
  <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">
 | 
						|
          <p class="ds-title">Cantidad de preguntas</p>
 | 
						|
        </div>
 | 
						|
        <div>
 | 
						|
          <p class="ds-subtitle">Configurar la cantidad mínima y máxima de preguntas por encuesta</p>
 | 
						|
        </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_minCantidadPreguntas">Cantidad mínima</label>
 | 
						|
          <input
 | 
						|
            type="number"
 | 
						|
            class="form-control"
 | 
						|
            name="minCantidadPreguntas"
 | 
						|
            id="field_minCantidadPreguntas"
 | 
						|
            data-cy="minCantidadPreguntas"
 | 
						|
            formControlName="minCantidadPreguntas"
 | 
						|
            min="1"
 | 
						|
          />
 | 
						|
          <div
 | 
						|
            *ngIf="
 | 
						|
              editForm.get('minCantidadPreguntas')!.invalid &&
 | 
						|
              (editForm.get('minCantidadPreguntas')!.dirty || editForm.get('minCantidadPreguntas')!.touched)
 | 
						|
            "
 | 
						|
          >
 | 
						|
            <small
 | 
						|
              class="form-text text-danger"
 | 
						|
              *ngIf="
 | 
						|
                (editForm.get('minCantidadPreguntas')?.errors?.required || !editForm.get('minCantidadPreguntas')?.errors?.pattern) &&
 | 
						|
                !(editForm.get('minCantidadPreguntas')?.errors?.max || editForm.get('minCantidadPreguntas')?.errors?.min)
 | 
						|
              "
 | 
						|
              jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
 | 
						|
            >
 | 
						|
              This field is required.
 | 
						|
            </small>
 | 
						|
 | 
						|
            <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
 | 
						|
            </small>
 | 
						|
          </div>
 | 
						|
        </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"
 | 
						|
              *ngIf="
 | 
						|
                (editForm.get('maxCantidadPreguntas')?.errors?.required || !editForm.get('maxCantidadPreguntas')?.errors?.pattern) &&
 | 
						|
                !(editForm.get('maxCantidadPreguntas')?.errors?.max || editForm.get('maxCantidadPreguntas')?.errors?.min)
 | 
						|
              "
 | 
						|
              jhiTranslate="dataSurveyApp.parametroAplicacion.datoInvalido"
 | 
						|
            >
 | 
						|
              This field is required.
 | 
						|
            </small>
 | 
						|
 | 
						|
            <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
 | 
						|
            </small>
 | 
						|
          </div>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
      <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>
 | 
						|
 | 
						|
        <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>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
</form>
 |