oggui/ogWebconsole/src/app/components/menus/create-menu/create-menu.component.html

65 lines
3.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<h2 mat-dialog-title>{{ menuId ? 'Editar' : 'Añadir' }} menú</h2>
<mat-dialog-content class="dialog-content">
<div class="form-container">
<!-- Formulario -->
<form [formGroup]="menuForm" (ngSubmit)="save()" class="menu-form">
<mat-form-field appearance="fill" class="form-field">
<mat-label>Nombre del menú</mat-label>
<input matInput formControlName="name" required>
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<span matPrefix>{{baseUrl}}/menu/</span>
<mat-label>Url pública</mat-label>
<input matInput formControlName="publicUrl" name="description">
</mat-form-field>
<mat-form-field appearance="fill" class="form-field" (click)="fileInput.click()"
style="cursor: pointer; margin-top: 15px;">
<mat-label>Suba el fichero que se usará como menú</mat-label>
<input matInput [value]="selectedFile ? selectedFile.name : 'Ningún fichero seleccionado'" readonly
placeholder="Seleccionar fichero" style="cursor: pointer; pointer-events: none;" tabindex="-1">
<input hidden (change)="onFileSelected($event)" #fileInput type="file">
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>Resolución</mat-label>
<mat-select formControlName="resolution" name="resolution">
<mat-option value="769">640×480 (8-bit - 256 colores)</mat-option>
<mat-option value="771">800×600 (8-bit - 256 colores)</mat-option>
<mat-option value="773">1024×768 (8-bit - 256 colores)</mat-option>
<mat-option value="775">1280×1024 (8-bit - 256 colores)</mat-option>
<mat-option value="784">640×480 (16-bit - 65k colores)</mat-option>
<mat-option value="787">800×600 (16-bit - 65k colores)</mat-option>
<mat-option value="791">1024×768 (16-bit - 65k colores)</mat-option>
<mat-option value="794">1280×1024 (16-bit - 65k colores)</mat-option>
<mat-option value="785">640×480 (24-bit - 16M colores)</mat-option>
<mat-option value="788">800×600 (24-bit - 16M colores)</mat-option>
<mat-option value="792">1024×768 (24-bit - 16M colores)</mat-option>
<mat-option value="795">1280×1024 (24-bit - 16M colores)</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>Comentarios</mat-label>
<input matInput formControlName="comments" name="comments">
</mat-form-field>
<mat-checkbox formControlName="isDefault" name="isDefault">
{{ 'defaultMenuLabel' | translate }}
</mat-checkbox>
</form>
<!-- Iframe -->
<div class="iframe-container" *ngIf="safeUrl">
<iframe [src]="safeUrl" class="iframe"></iframe>
</div>
</div>
</mat-dialog-content>
<mat-dialog-actions class="action-container">
<button class="ordinary-button" (click)="close()">Cancelar</button>
<button class="submit-button" (click)="save()">Guardar</button>
</mat-dialog-actions>