2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 ===================================================================
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
13 http://www.apache.org/licenses/LICENSE-2.0
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.
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
26 https://creativecommons.org/licenses/by/4.0/
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.
34 ============LICENSE_END============================================
39 <div class="container">
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">×</span>
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>
59 <div style="padding-bottom: 12px;"></div>
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">
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>
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>
80 <mat-tree-node *matTreeNodeDef="let node; when: hasNoContent" matTreeNodePadding>
81 <button mat-icon-button disabled></button>
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'}}
92 [indeterminate]="descendantsPartiallySelected(node)"
93 (change)="todoItemSelectionToggle(node)">{{node.item}}
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>
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)
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>
122 <div class="user-notif-label">
123 <span runat="server" ID="required" class="notifcation-label-required">*</span>End Date (Local Time)
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>
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
138 <textarea id="add-notification-input-title"
139 [(ngModel)]="notification.msgHeader" name="content" class="add-notification-input-title-ht">
141 <div id="user-title-required">
142 <small *ngIf="notification.msgHeader ==''" class="mandatory-categories">Title is Required</small>
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
152 <textarea id="user-notif-input-message" class="add-notification-input-title-ht"
153 [(ngModel)]="notification.msgDescription" name="content">
155 <div id="user-notif-message-required">
156 <small *ngIf="notification.msgDescription ==''" class="mandatory-categories">Message is Required</small>
163 <!--Modal Footer goes Here-->
164 <div class="modal-footer">
165 <button type="button" [hidden]="isEditMode" class="btn btn-primary" (click)="addUserNotification('')">Save</button>
166 <button type="button" class="btn btn-primary" (click)="activeModal.close('Close')">Cancel</button>