mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
#440 widgets show real values of the form
This commit is contained in:
parent
b75c9b7be9
commit
f43c7af2db
@ -1,4 +1,4 @@
|
|||||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" [attr.for]="field.id">
|
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" [attr.for]="field.id">
|
||||||
<input type="checkbox" [attr.id]="field.id" class="mdl-checkbox__input">
|
<input type="checkbox" [attr.id]="field.id" class="mdl-checkbox__input" [(ngModel)]="field.value">
|
||||||
<span class="mdl-checkbox__label">{{field.name}}</span>
|
<span class="mdl-checkbox__label">{{field.name}}</span>
|
||||||
</label>
|
</label>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label multiline-text-widget">
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label multiline-text-widget">
|
||||||
<textarea class="mdl-textfield__input" type="text" rows= "3" [attr.id]="field.id"></textarea>
|
<textarea class="mdl-textfield__input" type="text" rows= "3"
|
||||||
|
[attr.id]="field.id" [(ngModel)]="field.value">
|
||||||
|
</textarea>
|
||||||
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label number-widget">
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label number-widget">
|
||||||
<input class="mdl-textfield__input" type="text" pattern="-?[0-9]*(\.[0-9]+)?" [attr.id]="field.id">
|
<input class="mdl-textfield__input" type="text" pattern="-?[0-9]*(\.[0-9]+)?"
|
||||||
|
[attr.id]="field.id" [(ngModel)]="field.value">
|
||||||
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
||||||
<span class="mdl-textfield__error">Input is not a number!</span>
|
<span class="mdl-textfield__error">Input is not a number!</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label text-widget">
|
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label text-widget">
|
||||||
<input class="mdl-textfield__input" type="text" [attr.id]="field.id">
|
<input class="mdl-textfield__input" type="text" [attr.id]="field.id" [(ngModel)]="field.value">
|
||||||
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,6 +43,7 @@ export class FormFieldModel extends FormWidgetModel {
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
value: any;
|
||||||
tab: string;
|
tab: string;
|
||||||
colspan: number = 1;
|
colspan: number = 1;
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ export class FormFieldModel extends FormWidgetModel {
|
|||||||
this.id = json.id;
|
this.id = json.id;
|
||||||
this.name = json.name;
|
this.name = json.name;
|
||||||
this.type = json.type;
|
this.type = json.type;
|
||||||
|
this.value = json.value;
|
||||||
this.tab = json.tab;
|
this.tab = json.tab;
|
||||||
this.colspan = <number> json.colspan;
|
this.colspan = <number> json.colspan;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user