29f54a787f1ad0265a886c9ae72cbb3b90ee78ef
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / admin / local / triggers / trigger-edit.component.html
1 <eg-staff-banner bannerText="{{this.evtDefName}}" i18n-bannerText>
2 </eg-staff-banner>
3 <div class="text-center">
4     <button class="btn btn-outline-dark" (click)="back()">&#8592; Back to Notifications/Action Triggers</button>
5 </div>
6 <ul ngbNav #editNav="ngbNav" class="nav-tabs mb-3"
7     [activeId]="editTab" (navChange)="onTabChange($event)">
8     <li [ngbNavItem]="'def'">
9         <a ngbNavLink i18n>Edit Definition</a>
10         <ng-template ngbNavContent>
11             <ng-template #textAreaTemplate let-field="field" let-record="record">
12                 <textarea class="form-control" name="{{field.name}}"
13                     [readonly]="field.readOnly" [required]="field.isRequired()" 
14                     [ngModel]="record[field.name]()" 
15                     (ngModelChange)="record[field.name]($event)" style="height: 600px;">
16                 </textarea>
17             </ng-template>
18             <eg-fm-record-editor #eventDialog idlClass="atevdef" displayMode="inline" 
19                 recordId="{{this.evtDefId}}" mode="update" 
20                 [fieldOptions]="{message_template:{customTemplate:{template:textAreaTemplate}},template:{customTemplate:{template:textAreaTemplate}}}"
21                 fieldOrder="owner,name,hook,active,delay,delay_field,group_field,reactor,validator,repeat_delay,id,cleanup_failure,granularity,max_delay,message_library_path,message_template,message_title,message_usr_path,opt_in_setting,usr_field,retention_interval,cleanup_success,template">
22             </eg-fm-record-editor>
23             <div class="text-right">
24                 <button class="btn btn-outline-dark mr-3" (click)="back()">&#8592; Back to Notifications/Action Triggers</button>
25             </div>
26         </ng-template>
27     </li>
28     <li ngbNavItem="'env'">
29         <a ngbNavLink i18n>Edit Environment</a>
30         <ng-template ngbNavContent>
31             <h3 class="mb-3">Trigger Event Environment</h3>
32             <eg-grid #envGrid idlClass="atenv" [dataSource]="envDataSource" 
33                 showFields="path,collector,label"
34                 (onRowActivate)="editSelected([$event])">
35                 <eg-grid-toolbar-button label="New Environment" i18n-label
36                     [action]="createNewEnv"></eg-grid-toolbar-button>
37                 <eg-grid-toolbar-action label="Edit Environment" i18n-label 
38                     [action]="editSelected"></eg-grid-toolbar-action>
39                 <eg-grid-toolbar-action label="Delete Selected" i18n-label 
40                     (onClick)="deleteSelected($event)"></eg-grid-toolbar-action>
41             </eg-grid>
42             <eg-fm-record-editor #envDialog idlClass="atenv"
43                 hiddenFields="event_def,id"></eg-fm-record-editor>
44         </ng-template>
45     </li>
46     <li ngbNavItem="'param'">
47         <a ngbNavLink i18n>Edit Parameters</a>
48         <ng-template ngbNavContent>
49             <h3 class="mb-3">Trigger Event Parameters</h3>
50             <eg-grid #paramGrid idlClass="atevparam" [dataSource]="paramDataSource" 
51                 showFields="param,value" (onRowActivate)="editSelected([$event])">
52                 <eg-grid-toolbar-button label="New Parameter" i18n-label
53                     [action]="createNewParam"></eg-grid-toolbar-button>
54                 <eg-grid-toolbar-action label="Edit Parameter" i18n-label 
55                     [action]="editSelected"></eg-grid-toolbar-action>
56                 <eg-grid-toolbar-action label="Delete Selected" i18n-label 
57                     (onClick)="deleteSelected($event)"></eg-grid-toolbar-action>
58             </eg-grid>
59             <eg-fm-record-editor #paramDialog idlClass="atevparam"
60                 hiddenFields="event_def,id"></eg-fm-record-editor>
61         </ng-template>
62     </li>
63     <li ngbNavItem="'test'">
64         <a ngbNavLink i18n>Run Tests</a>
65         <ng-template ngbNavContent>
66             <h3 class="mb-3">Run Tests</h3>
67             <label id="barcode">Barcode of Circulating Copy </label>
68             <input aria-labelledby="barcode" type="text" [(ngModel)]="barcode" 
69                 (keyup.enter)="runTest(barcode)" class="ml-2" />
70             <div></div>
71             <button class="btn btn-info" (click)="runTest(barcode)" i18n>Go</button>
72             <div [hidden]="!testDone">
73                 <div class="mt-3 border rounded p-2 bg-light">
74                     <div>{{testErr1}}</div>
75                     <div>{{testErr2}}</div>
76                     <pre [hidden]="!testResult">{{testResult}}</pre>
77                 </div>
78                 <button class="btn btn-outline-dark mt-3" (click)="clearTestResults()" i18n>
79                     Clear Test Results
80                 </button>
81             </div>
82         </ng-template>
83     </li>
84 </ul>
85 <div [ngbNavOutlet]="editNav"></div>
86
87 <eg-string #createSuccessString i18n-text text="New entry Added"></eg-string>
88 <eg-string #createErrString i18n-text text="Failed to create new entry"></eg-string>
89 <eg-string #deleteFailedString i18n-text text="Delete of entry failed or was not allowed">
90 </eg-string>
91 <eg-string #deleteSuccessString i18n-text text="Delete of entry succeeded"></eg-string>
92 <eg-string #updateFailedString i18n-text text="Update of entry failed or was not allowed">
93 </eg-string>
94 <eg-string #updateSuccessString i18n-text text="Update of entry succeeded"></eg-string>
95 <eg-string #cloneFailedString i18n-text text="Clone of entry failed or was not allowed">
96 </eg-string>
97 <eg-string #cloneSuccessString i18n-text text="Clone of entry succeeded"></eg-string>