rsanchez
2017-03-21 a6e1ace2b6bdba8c08a4acfa42433f3ac073b747
securis/src/main/webapp/src/app/forms/organization.form.html
....@@ -3,24 +3,11 @@
33 <button md-icon-button (click)="goBack()" color="accent">
44 <md-icon>arrow_back</md-icon>
55 </button>
6
- <span class="md-title" [innerText]="form_title"></span>
6
+ <span [innerText]="form_title"></span>
77 <span flex></span>
88 <button md-icon-button (click)="save()"><md-icon>save</md-icon></button>
99 </md-toolbar>
10
- <!--
11
- code: 'CICS',
12
- creation_timestamp: 1418384439000,
13
- description: 'Wellbore integrity analysis software',
14
- id: 1,
15
- license_filename: 'config_server.lic',
16
- name: 'CurisIntegrity',
17
- metadata:
18
- [ { key: 'max_docs',
19
- value: '250000',
20
- readonly: true,
21
- mandatory: true } ]
22
-}
23
- -->
10
+
2411 <div class="margin" layout-align-gt-xs="center start" layout-fill="" layout-gt-xs="row">
2512 <md-card flex="70">
2613 <md-card-title>
....@@ -31,8 +18,8 @@
3118 <form #form="ngForm" class="inset">
3219 <div layout="column" layout-align="start center">
3320 <div layout="row" layout-fill layout-padding>
34
- <field-readonly [value]="data.id" label="field.id" flex="15" *ngIf="!isNew"></field-readonly>
35
- <div layout="column" layout-fill flex>
21
+ <field-readonly [value]="data.id" label="field.id" flex="10" *ngIf="!isNew"></field-readonly>
22
+ <div layout="column" layout-fill flex="30">
3623 <md-input-container>
3724 <input #firstField mdInput maxLength="50" type="text" [(ngModel)]="data.code" name="code" required [readonly]="!isNew" />
3825 <md-placeholder>
....@@ -41,8 +28,6 @@
4128 </md-input-container>
4229 <error-checker [fieldName]="getFieldName('code')" [formField]="form.controls.code"></error-checker>
4330 </div>
44
- </div>
45
- <div layout="row" layout-fill layout-padding>
4631 <div layout="column" layout-fill flex>
4732 <md-input-container flex>
4833 <input mdInput type="text" [(ngModel)]="data.name" name="name" required />
....@@ -51,15 +36,6 @@
5136 </md-placeholder>
5237 </md-input-container>
5338 <error-checker [fieldName]="getFieldName('name')" [formField]="form.controls.name"></error-checker>
54
- </div>
55
- <div layout="column" layout-fill flex>
56
- <md-input-container flex>
57
- <input mdInput type="text" [(ngModel)]="data.license_filename" name="license_filename" required />
58
- <md-placeholder>
59
- <span i18n="field.license_filename"></span>
60
- </md-placeholder>
61
- </md-input-container>
62
- <error-checker [fieldName]="getFieldName('license_filename')" [formField]="form.controls.license_filename"></error-checker>
6339 </div>
6440 </div>
6541 <div layout="row" layout-fill layout-padding>
....@@ -73,10 +49,21 @@
7349 </md-input-container>
7450 </div>
7551 </div>
76
- <div layout="row" layout-fill layout-padding *ngIf="!isNew">
77
- <field-readonly [value]="data.creation_timestamp | date: 'medium'" label="field.creation_timestamp" flex></field-readonly>
52
+ <div layout="row" layout-fill layout-padding >
53
+ <div layout="column" layout-fill flex>
54
+ <md-select [placeholder]="getFieldName('org_parent_id')" flex [(ngModel)]="data.org_parent_id" name="org_parent_id">
55
+ <md-option *ngFor="let org of parentOrganizations" [value]="org.id">
56
+ {{org.label}}
57
+ </md-option>
58
+ </md-select>
59
+ <error-checker [fieldName]="getFieldName('org_parent_id')" [formField]="form.controls.org_parent_id"></error-checker>
60
+ </div>
7861 </div>
79
- <metadata-manager addOrDelete="true" editKeys="true" [metadata]="data.metadata" ></metadata-manager>
62
+ <div layout="row" layout-fill layout-padding >
63
+ <td-chips flex [mdTooltip]="$L.get('Users with access to this organization')" [placeholder]="$L.get('Select users')"
64
+ [items]="usernames" [(ngModel)]="data.users_ids" name="users_ids" requireMatch>
65
+ </td-chips>
66
+ </div>
8067 </div>
8168 </form>
8269 </md-card-content>