69 lines
3.1 KiB
HTML
69 lines
3.1 KiB
HTML
<h1 mat-dialog-title i18n="@@edit-client-dialog-title">Editar Cliente</h1>
|
|
<div class="mat-dialog-content" [ngClass]="{'loading': loading}">
|
|
<mat-spinner class="loading-spinner" *ngIf="loading"></mat-spinner>
|
|
<form [formGroup]="clientForm" class="client-form" *ngIf="!loading">
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@organizational-unit-label">Padre</mat-label>
|
|
<mat-select formControlName="organizationalUnit">
|
|
<mat-option *ngFor="let unit of parentUnits" [value]="unit['@id']">
|
|
{{ unit.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@name-label">Nombre</mat-label>
|
|
<input matInput formControlName="name">
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@serial-number-label">Número de Serie</mat-label>
|
|
<input matInput formControlName="serialNumber">
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@netiface-label">Interfaz de red</mat-label>
|
|
<mat-select formControlName="netiface">
|
|
<mat-option *ngFor="let type of netifaceTypes" [value]="type.value">
|
|
{{ type.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@net-driver-label">Controlador de red</mat-label>
|
|
<mat-select formControlName="netDriver">
|
|
<mat-option *ngFor="let type of netDriverTypes" [value]="type.value">
|
|
{{ type.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@mac-label">MAC</mat-label>
|
|
<input matInput formControlName="mac">
|
|
<mat-error i18n="@@mac-error">Formato de MAC inválido. Ejemplo válido: 00:11:22:33:44:55</mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@ip-label">Dirección IP</mat-label>
|
|
<input matInput formControlName="ip">
|
|
<mat-error i18n="@@ip-error">Formato de dirección IP inválido. Ejemplo válido: 127.0.0.1</mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@menu-url-label">Menú URL</mat-label>
|
|
<input matInput formControlName="menu" type="url">
|
|
<mat-error i18n="@@menu-url-error">Formato de URL inválido.</mat-error>
|
|
</mat-form-field>
|
|
<mat-form-field class="form-field">
|
|
<mat-label i18n="@@hardware-profile-label">Perfil de Hardware</mat-label>
|
|
<mat-select formControlName="hardwareProfile">
|
|
<mat-option *ngFor="let unit of hardwareProfiles" [value]="unit['@id']">
|
|
{{ unit.description }}
|
|
</mat-option>
|
|
</mat-select>
|
|
<mat-error i18n="@@hardware-profile-error">Formato de URL inválido.</mat-error>
|
|
</mat-form-field>
|
|
</form>
|
|
</div>
|
|
<div mat-dialog-actions>
|
|
<button mat-button (click)="onNoClick()" i18n="@@cancel-button">Cancelar</button>
|
|
<button mat-button [disabled]="!clientForm.valid" (click)="onSubmit()">
|
|
{{ !isEditMode ? 'Añadir' : 'Guardar' }}
|
|
</button>
|
|
</div>
|