[DEV] add render form component
This commit is contained in:
parent
62c92ebe5d
commit
2ab3b85806
@ -42,7 +42,7 @@ import {
|
||||
UserService,
|
||||
} from 'common/service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ErrorComponent, PopInComponent, SpinerComponent, TopMenuComponent, UploadFileComponent, PasswordEntryComponent, EntryComponent, AsyncActionStatusComponent, ErrorMessageStateComponent, CheckboxComponent, BurgerPropertyComponent, EntryValidatorComponent, RenderSettingsComponent } from 'common/component';
|
||||
import { ErrorComponent, PopInComponent, SpinerComponent, TopMenuComponent, UploadFileComponent, PasswordEntryComponent, EntryComponent, AsyncActionStatusComponent, ErrorMessageStateComponent, CheckboxComponent, BurgerPropertyComponent, EntryValidatorComponent, RenderSettingsComponent, RenderFormComponent } from 'common/component';
|
||||
import { ForbiddenScene } from 'common/scene';
|
||||
import { AdminUserService, ApplicationService, ApplicationTokenService, SettingsService } from 'app/service';
|
||||
import { PopInUploadProgress, PopInDeleteConfirm } from 'common/popin';
|
||||
@ -62,6 +62,7 @@ import { PopInUploadProgress, PopInDeleteConfirm } from 'common/popin';
|
||||
CheckboxComponent,
|
||||
BurgerPropertyComponent,
|
||||
RenderSettingsComponent,
|
||||
RenderFormComponent,
|
||||
|
||||
PopInComponent,
|
||||
PopInUploadProgress,
|
||||
|
@ -7,9 +7,10 @@ import { ErrorMessageStateComponent } from './error-message-state/error-message-
|
||||
import { ErrorComponent } from './error/error';
|
||||
import { PasswordEntryComponent } from './password-entry/password-entry';
|
||||
import { PopInComponent } from './popin/popin';
|
||||
import { RenderFormComponent } from './render-settings/render-form';
|
||||
import { RenderSettingsComponent } from './render-settings/render-settings';
|
||||
import { SpinerComponent } from './spiner/spiner';
|
||||
import { TopMenuComponent } from './top-menu/top-menu';
|
||||
import { UploadFileComponent } from './upload-file/upload-file';
|
||||
|
||||
export { BurgerPropertyComponent, CheckboxComponent, RenderSettingsComponent, ErrorMessageStateComponent, AsyncActionState, AsyncActionStatusComponent, EntryValidatorComponent, PopInComponent, TopMenuComponent, UploadFileComponent, ErrorComponent, SpinerComponent, PasswordEntryComponent, EntryComponent };
|
||||
export { BurgerPropertyComponent, CheckboxComponent, RenderFormComponent, RenderSettingsComponent, ErrorMessageStateComponent, AsyncActionState, AsyncActionStatusComponent, EntryValidatorComponent, PopInComponent, TopMenuComponent, UploadFileComponent, ErrorComponent, SpinerComponent, PasswordEntryComponent, EntryComponent };
|
||||
|
28
front/src/common/component/render-settings/render-form.html
Normal file
28
front/src/common/component/render-settings/render-form.html
Normal file
@ -0,0 +1,28 @@
|
||||
<table width="100%">
|
||||
<tr *ngFor="let elem of values">
|
||||
<td width="15%" *ngIf="elem.type !== 'LINE'"
|
||||
[style.color]="elem.require && elem.value.length === 0 && elem.newValue === undefined ? 'red' : ''"
|
||||
><b>{{elem.title}}</b></td>
|
||||
<td width="85%" *ngIf="elem.type !== 'LINE'">
|
||||
<app-entry
|
||||
*ngIf="elem.type === 'STRING'"
|
||||
[value]="elem.value"
|
||||
[placeholder]="elem.placeholder"
|
||||
[hasError]="elem.state !== undefined"
|
||||
(changeValue)="checkParameter($event, elem)"></app-entry>
|
||||
<app-password-entry
|
||||
*ngIf="elem.type === 'PASSWORD'"
|
||||
[value]="elem.value"
|
||||
[placeholder]="elem.placeholder"
|
||||
[hasError]="elem.state !== true"
|
||||
(changeValue)="checkParameter($event, elem)"></app-password-entry>
|
||||
<app-checkbox
|
||||
*ngIf="elem.type === 'BOOLEAN'"
|
||||
[value]="elem.value"
|
||||
(changeValue)="checkParameter($event, elem)"></app-checkbox>
|
||||
<app-error-message-state [value]="elem.state"></app-error-message-state>
|
||||
</td>
|
||||
<td width="85%" *ngIf="elem.type === 'LINE'"></td>
|
||||
<td width="85%" *ngIf="elem.type === 'LINE'"></td>
|
||||
</tr>
|
||||
</table>
|
17
front/src/common/component/render-settings/render-form.ts
Normal file
17
front/src/common/component/render-settings/render-form.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/** @file
|
||||
* @author Edouard DUPIN
|
||||
* @copyright 2018, Edouard DUPIN, all right reserved
|
||||
* @license PROPRIETARY (see license file)
|
||||
*/
|
||||
import { Component } from '@angular/core';
|
||||
import { RenderSettingsComponent } from './render-settings';
|
||||
|
||||
@Component({
|
||||
selector: 'app-render-form',
|
||||
templateUrl: 'render-form.html',
|
||||
styleUrls: ['render-form.less'],
|
||||
})
|
||||
export class RenderFormComponent extends RenderSettingsComponent {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user