Added new componetnts inside page modules
[portal.git] / portal-FE-common / src / app / pages / user-notification-admin / new-notification-modal / new-notification-modal.component.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6   ===================================================================
7  
8   Unless otherwise specified, all software contained herein is licensed
9   under the Apache License, Version 2.0 (the "License");
10   you may not use this software except in compliance with the License.
11   You may obtain a copy of the License at
12  
13               http://www.apache.org/licenses/LICENSE-2.0
14  
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20  
21   Unless otherwise specified, all documentation contained herein is licensed
22   under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23   you may not use this documentation except in compliance with the License.
24   You may obtain a copy of the License at
25  
26               https://creativecommons.org/licenses/by/4.0/
27  
28   Unless required by applicable law or agreed to in writing, documentation
29   distributed under the License is distributed on an "AS IS" BASIS,
30   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31   See the License for the specific language governing permissions and
32   limitations under the License.
33  
34   ============LICENSE_END============================================
35  
36   
37   -->
38  
39 <div class="container">
40   <!--Modal Headers-->
41   <div class="modal-header">
42     <h4 class="modal-title">Add a New Notification</h4>
43     <button type="button" class="close" aria-label="Close" (click)="activeModal.dismiss('Cross')">
44       <span aria-hidden="true">&times;</span>
45     </button>
46   </div>
47
48   <!--Modal Body goes here-->
49   <div class="modal-body" [ngClass]="{'disable-div': (isEditMode)}">
50     <div class="user-notification-details-contents">
51         <!-- Left Side container-->
52         <div class="left-container">
53             <div id="add-user-notif-broadcast" class="add-widget-field">
54                 <div class="user-notif-label" style="padding-bottom: 7px">Broadcast to All Categories</div>
55                 <mat-radio-group [(ngModel)]="notification.isForAllRoles" #radioGroup="matRadioGroup" aria-label="Select an option">
56                     <span style="padding-left: 12px;"><mat-radio-button value="Y">Yes</mat-radio-button></span><br/>
57                     <span style="padding-left: 12px;"><mat-radio-button value="N">No</mat-radio-button></span>
58                 </mat-radio-group>
59                 <div style="padding-bottom: 12px;"></div>
60
61                 <div class="categories-selection" [ngClass]="{'disable-category-selection': (!notification.isForAllRoles ||notification.isForAllRoles=='Y')}">
62                   <div [ngClass]="{'required': (notification.isForAllRoles=='N')}" style="padding-bottom: 7px">
63                     Categories
64                   </div>
65                   <mat-radio-group [(ngModel)]="notification.isFunctionalMenu" #radioGroup="matRadioGroup" aria-label="Select an option">
66                       <span style="padding-left: 12px;"><mat-radio-button (click)="getFunctionalMenu()" value="Y">Functional Menu</mat-radio-button></span><br/>
67                       <span style="padding-left: 12px;"><mat-radio-button (click)="getAppRoleIds()" value="N">Application Roles</mat-radio-button></span>
68                   </mat-radio-group>
69                   <br/>
70                   <div id="user-notif-tree-div" class="tree-div" >
71                     <!-- Mat Tree code will goes here..-->
72                     <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
73                       <mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding>
74                         <button mat-icon-button disabled></button>
75                         <mat-checkbox class="checklist-leaf-node"
76                                       [checked]="checklistSelection.isSelected(node)"
77                                       (change)="checklistSelection.toggle(node);">{{node.item}}</mat-checkbox>
78                       </mat-tree-node>
79                     
80                       <mat-tree-node *matTreeNodeDef="let node; when: hasNoContent" matTreeNodePadding>
81                         <button mat-icon-button disabled></button>                       
82                       </mat-tree-node>
83                     
84                       <mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
85                         <button mat-icon-button matTreeNodeToggle
86                                 [attr.aria-label]="'toggle ' + node.filename">
87                           <mat-icon class="mat-icon-rtl-mirror">
88                             {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
89                           </mat-icon>
90                         </button>
91                         <mat-checkbox 
92                             [indeterminate]="descendantsPartiallySelected(node)"
93                             (change)="todoItemSelectionToggle(node)">{{node.item}}
94                         </mat-checkbox>
95                       </mat-tree-node>
96                     </mat-tree>
97                   </div>
98                 </div>
99             </div>
100         </div>
101
102         <!-- Right Side container-->
103         <div id="app-conatiner-right" class="right-container">
104             <div id="add-user-notif-priority" class="add-widget-field">
105                 <div id="user-notification-priority-label" class="user-notif-label">Priority</div>
106                 <mat-radio-group [(ngModel)]="notification.priority" #radioGroup="matRadioGroup" aria-label="Select an option">
107                     <span><mat-radio-button value="1">Normal</mat-radio-button></span><br/>
108                     <span><mat-radio-button value="2">Important</mat-radio-button></span>
109                 </mat-radio-group>
110             </div>
111             <div id="add-user-notif-startdate" class="add-widget-field" style="padding-bottom: 12px; width: 301px !important;">
112               <div id="user-notification-startdate-label" class="user-notif-label">
113                 <div class="user-notif-label">
114                   <span runat="server" ID="required" class="notifcation-label-required">*</span>Start Date (Local Time)
115                 </div>
116                 <mat-form-field>
117                     <input [(ngModel)]="notification.startTime" name="startTime" matInput [matDatepicker]="startdate" 
118                       placeholder="MM/dd/yyyy">
119                     <mat-datepicker-toggle matSuffix [for]="startdate"></mat-datepicker-toggle>
120                     <mat-datepicker #startdate></mat-datepicker>
121                 </mat-form-field>
122                 <div class="user-notif-label">
123                     <span runat="server" ID="required" class="notifcation-label-required">*</span>End Date (Local Time)
124                 </div>
125                 <mat-form-field>
126                     <input [(ngModel)]="notification.endTime" name="endTime" matInput [matDatepicker]="enddate" 
127                       placeholder="MM/dd/yyyy">
128                     <mat-datepicker-toggle matSuffix [for]="enddate"></mat-datepicker-toggle>
129                     <mat-datepicker #enddate></mat-datepicker>
130                 </mat-form-field>
131               </div>
132             </div>
133
134             <div id="add-user-notif-title" class="add-widget-field" style="padding-bottom: 12px;">
135               <div id="user-notification-title-label" class="user-notif-label">
136                 <span runat="server" ID="required" class="notifcation-label-required" visible="false"> *</span> Title
137               </div>
138               <textarea id="add-notification-input-title"
139                  [(ngModel)]="notification.msgHeader" name="content" class="add-notification-input-title-ht">
140               </textarea>
141               <div id="user-title-required">
142                 <small *ngIf="notification.msgHeader ==''" class="mandatory-categories">Title is Required</small>
143               </div>
144             </div>
145
146             <div id="add-user-notif-message" class="add-widget-field"
147               style="padding-bottom: 12px;">
148               <div id="user-notif-message-label" class="user-notif-label">
149                 <span runat="server" ID="required" class="notifcation-label-required"
150                   visible="false"> *</span> Message
151               </div>
152               <textarea id="user-notif-input-message" class="add-notification-input-title-ht"
153                 [(ngModel)]="notification.msgDescription" name="content">
154               </textarea>
155               <div id="user-notif-message-required">
156                 <small *ngIf="notification.msgDescription ==''" class="mandatory-categories">Message is Required</small>
157               </div>
158             </div>
159         </div>
160     </div>
161   </div>
162
163   <!--Modal Footer goes Here-->
164   <div class="modal-footer">
165     <button type="button" [hidden]="isEditMode" class="btn btn-primary" (click)="addUserNotification('')">Save</button> &nbsp;
166     <button type="button" class="btn btn-primary" (click)="activeModal.close('Close')">Cancel</button>
167   </div>
168 </div>